Skip to content

Commit

Permalink
[+]: use a new version of "voku/simple_html_dom" (4.7.16)
Browse files Browse the repository at this point in the history
-> fix issue #49
  • Loading branch information
voku committed Apr 5, 2020
1 parent 1cb2878 commit e0c79b6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
# Changelog 4.4.1 (2020-04-05)

- use a new version of "voku/simple_html_dom" (4.7.16)

# Changelog 4.4.0 (2020-04-05)

- add support for removing more default attributes
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -19,7 +19,7 @@
],
"require": {
"php": ">=7.0.0",
"voku/simple_html_dom": "~4.7.15",
"voku/simple_html_dom": "~4.7.16",
"ext-dom": "*"
},
"require-dev": {
Expand Down
18 changes: 18 additions & 0 deletions tests/HtmlMinTest.php
Expand Up @@ -773,6 +773,24 @@ public function testHtmlInsideJavaScriptTemplates()
static::assertSame($expected, $htmlMin->minify($html));
}

public function testHtmlClosingTagInSpecialScript()
{
$htmlMin = new \voku\helper\HtmlMin();
$htmlMin->doOptimizeViaHtmlDomParser(true);
$html = $htmlMin->minify('
<script id="comment-loader" type="text/x-handlebars-template">
<nocompress>
<i class="fas fa-spinner fa-pulse"></i> Loading ...
</nocompress>
</script>');

$expected = '<script id=comment-loader type=text/x-handlebars-template><nocompress>
<i class="fas fa-spinner fa-pulse"></i> Loading ...
</nocompress></script>';

static::assertSame($expected, $html);
}

public function testVueJsExample()
{
// init
Expand Down

0 comments on commit e0c79b6

Please sign in to comment.