Closed pbodnar closed 2 years ago
This was de-facto resolved within #135 - this method was made deprecated and it isn't used by mistletoe itself anymore. Also, HTML entities are unescaped earlier in the process now and simple html.escape()
is called whenever necessary.
This means that we keep escaping quotes ("
becomes "
) and we also newly escape '
as '
, but nobody will probably complain about this. Also see this comment within #135 about compliance with CommonMark spec.
The implementation of
html_escape()
seems a bit inefficient and it also escapes"
when it is not actually necessary.Here is its source code:
I think that
html.escape()
's boolean parameterquote
should be probably used instead of the call toreplace()
: setquote
toFalse
when escaping text outside of an attribute value, set it toTrue
otherwise. The rendered result will change for the latter case, i. e.'
will be escaped, but it shouldn't matter, or should it?