mochi/mochiweb

Missing charref error

jockee opened this issue · 2 comments

:mochiweb_html.parse("&;"), :mochiweb_html.parse("&MISSING;") gives this.

** (CaseClauseError) no case clause matching: {:undefined, {:decoder, 1, 3, 2}}
src/mochiweb_html.erl:642: :mochiweb_html.tokenize_charref/2
src/mochiweb_html.erl:302: :mochiweb_html.tokens/3
src/mochiweb_html.erl:82: :mochiweb_html.parse/1

The specific case I bumped into was parsing an HTML email's content. It, for some reason, included this string:

"&dataCardSource=DAILY_SNAPSHOT_INT);"

Which resulted in the same error.

Thanks for the report!

Thanks!