Yes, this is the correct place to change the code so it behaves as you
intended.
My solution will distinguish "&" encoding between text and attribute
values, just like peLt and peLtAttribValue do. It will be in the next
release.
Why do you need this, if you don't mind?
Ralf
On 10.06.2021 16:03, Max Terentiev wrote:
I fixed problem by changing line 380 of DIUnicodeHtmlWriter.pas_______________________________________________
from this
UCP_AMPERSAND:
if (not (avoNoAmpEscapeBeforeCurly in Options)
or (i >= l) or (U16_NEXT_OR_FFFD(p, i, l) <>
UCP_LEFT_CURLY_BRACKET)) then
WriteBufW('&', 5)
to this
UCP_AMPERSAND:
if (peAmp in FPredefinedEntities) and (not
(avoNoAmpEscapeBeforeCurly in Options)
or (i >= l) or (U16_NEXT_OR_FFFD(p, i, l) <>
UCP_LEFT_CURLY_BRACKET)) then
WriteBufW('&', 5)
It's works for me now.