Merge pull request #1544 from shydah/pr/template-srcset

템플릿 내 srcset의 상대경로를 절대경로로 변환하도록 개선
This commit is contained in:
Kijin Sung 2021-01-07 23:04:59 +09:00 committed by GitHub
commit e2e32902b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 50 additions and 4 deletions

View file

@ -275,6 +275,11 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
array(
'<input>asdf src="../img/img.gif" asdf</input>',
'?><input>asdf src="../img/img.gif" asdf</input>'
),
// srcset (PR #1544)
array(
'<img src="./img/sticker_banner_960w.png" alt="this is a test image." srcset="https://abc.com/static/img/test@2x.png 2x, http://abc.com/static/test@2.5x.png 2.5x,../img/test@3x.png 3x, ../img/test_960w.png 960w, {$mid}/image.png 480w">',
'?><img src="/rhymix/tests/unit/classes/template/img/sticker_banner_960w.png" alt="this is a test image." srcset="https://abc.com/static/img/test@2x.png 2x, http://abc.com/static/test@2.5x.png 2.5x, /rhymix/tests/unit/classes/img/test@3x.png 3x, /rhymix/tests/unit/classes/img/test_960w.png 960w, <?php echo $__Context->mid ?>/image.png 480w">'
),
// Rhymix improvements (PR #604)
array(