[yunqa.de] Re: TDIHtmlCasePlugin problem

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Thu, 10 Jun 2021 17:02:21 +0200

Yes, this is the correct place to change the code so it behaves as you intended.

My solution will distinguish "&amp;" 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('&amp;', 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('&amp;', 5)

It's works for me now.
_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: