mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 14:52:24 +09:00
fix #1510 이미지 경로 전에 cond사용이 제한되는 문제 고침
- `>`문자열로 img태그의 종료점을 찾으므로 `cond`속성을 먼저 사용할 경우 제한될 수 있었음 - test case 추가
This commit is contained in:
parent
98cc32a2ce
commit
f6a538a655
2 changed files with 17 additions and 2 deletions
|
|
@ -236,7 +236,7 @@ class TemplateHandler
|
|||
$buff = preg_replace('@<!--//.*?-->@s', '', $buff);
|
||||
|
||||
// replace value of src in img/input/script tag
|
||||
$buff = preg_replace_callback('/<(?:img|input|script)[^<>]*src="(?!https?:\/\/|[\/\{])([^"]+)"/is', array($this, '_replacePath'), $buff);
|
||||
$buff = preg_replace_callback('/<(?:img|input|script)(?(?=[[:space:]]+?cond=")[[:space:]]+?cond="[^"]+"|)[^<>]*[[:space:]]src="(?!https?:\/\/|[\/\{])([^"]+)"/is', array($this, '_replacePath'), $buff);
|
||||
|
||||
// replace loop and cond template syntax
|
||||
$buff = $this->_parseInline($buff);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue