kangax / kangax/html-minifier

Parse error with <a href

Open
#1,037 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5k
Forks
577
PR merge metrics
No merged PRs in 30d

Description

env
hexo: 3.9.0
hexo-theme: spfk
html-minifier:2.1.2

Parse error while encounter yab1l992mg85 yab1l992mg86 < yab1l992mg87 t yab1l992mg88 yab1l992mg89 m yab1l992mg90 e yab1l992mg91 yab1l992mg92 d yab1l992mg93 yab1l992mg94 t yab1l992mg95 e yab1l992mg96 t yab1l992mg97 i yab1l992mg98 yab1l992mg99 e yab1l992mg100 = yab1l992mg101 " yab1l992mg102 2 yab1l992mg103 yab1l992mg104 1 yab1l992mg105 7 yab1l992mg106 - yab1l992mg107 1 yab1l992mg108 yab1l992mg109 - yab1l992mg110 2 yab1l992mg111 4 yab1l992mg112 T yab1l992mg113 yab1l992mg114 5 yab1l992mg115 : yab1l992mg116 4 yab1l992mg117 4 yab1l992mg118 yab1l992mg119 0 yab1l992mg120 0 yab1l992mg121 . yab1l992mg122 0 yab1l992mg123 yab1l992mg124 0 yab1l992mg125 Z yab1l992mg126 " yab1l992mg127 yab1l992mg128 yab1l992mg129 t yab1l992mg130 e yab1l992mg131 m yab1l992mg132 p yab1l992mg133 yab1l992mg134 o yab1l992mg135 p yab1l992mg136 = yab1l992mg137 " yab1l992mg138 yab1l992mg139 a yab1l992mg140 t yab1l992mg141 e yab1l992mg142 P yab1l992mg143 yab1l992mg144 b yab1l992mg145 l yab1l992mg146 i yab1l992mg147 s yab1l992mg148 yab1l992mg149 e yab1l992mg150 d yab1l992mg151 " yab1l992mg152 > yab1l992mg153 yab1l992mg154 0 yab1l992mg155 1 yab1l992mg156 7 yab1l992mg157 - yab1l992mg158 yab1l992mg159 0 yab1l992mg160 - yab1l992mg161 2 yab1l992mg162 4 yab1l992mg163 yab1l992mg164 / yab1l992mg165 t yab1l992mg166 i yab1l992mg167 m yab1l992mg168 yab1l992mg169 > yab1l992mg170 yab1l992mg171 < yab1l992mg172 / yab1l992mg173 yab1l992mg174 > yab1l992mg175
at new HTMLParser (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/html-minifier/src/htmlparser.js:235:13)
at minify (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/html-minifier/src/htmlminifier.js:945:3)
at exports.minify (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/html-minifier/src/htmlminifier.js:1294:10)
at Hexo.logic_html (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/hexo-neat/lib/filter.js:28:18)
at Filter.execSync (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/hexo/lib/extend/filter.js:74:28)
at Hexo.execFilterSync (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/hexo/lib/hexo/index.js:432:29)
at Theme._View.View._compiledSync (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/hexo/lib/theme/view.js:120:18)
at Theme._View.View.View.renderSync (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/hexo/lib/theme/view.js:48:23)
at Object.partial (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
at eval (eval at compile (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/ejs/lib/ejs.js:633:12), :20:17)
at returnedFn (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/ejs/lib/ejs.js:668:17)
at Theme._View.View._compiledSync (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/hexo/lib/theme/view.js:119:22)
at Theme._View.View.View.renderSync (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/hexo/lib/theme/view.js:48:23)
at Object.partial (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
at eval (eval at compile (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/ejs/lib/ejs.js:633:12), :15:17)
at Model._Query.Query.Query.forEach (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/warehouse/lib/query.js:42:5)
at eval (eval at compile (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/ejs/lib/ejs.js:633:12), :12:19)
at returnedFn (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/ejs/lib/ejs.js:668:17)
at Theme._View.View._compiledSync (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/hexo/lib/theme/view.js:119:22)
at Theme._View.View.View.renderSync (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/hexo/lib/theme/view.js:48:23)
at Object.partial (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
at eval (eval at compile (/Users/pr0ph3t/Desktop/blog/hexo/node_modules/ejs/lib/ejs.js:633:12), :9:17)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported parse failure with html-minifier 2.1.2, then inspect html-minifier/src/htmlparser.js at line 235 and the call from html-minifier/src/htmlminifier.js at line 945. Done means the reported HTML input no longer produces the parse error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.