msva / lua-htmlparser

An HTML parser for lua.
231 stars 44 forks source link

deadloop when attribute has <> char #42

Closed RelicOfTesla closed 7 years ago

RelicOfTesla commented 8 years ago
htmlparser.parse([[
<div data-pic="aa<%=image_url%>bb" ></div>
]])
print('ok')

Lua 5.1.5 / Lua 5.3.2 not print "ok", deadlock!!

msva commented 7 years ago

Hi! Sorry for ignoring the issue for year. Unfortunatelly github didn't send me notifications about new issues after previous maintainer rerooted the repo. It looks like it was he, who get all those emails.

I'll try to handle all the issues in the near time.

msva commented 7 years ago

Actually, it is not intended to use this module with templaters (looks like something ruby'ish, or, maybe, moonscript?). And if you anyway want to do that, it is intended that you'll take care of template strings before passing it to the parser (here should be reminder why HTML parsing is bad). But I'll try to add special condition for that, to not deadloop.