[yunqa.de] missing the '=' in tag attribute with empty value after deletion another attribute

  • From: Кудрявцев Дмитрий <d.v.k@xxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Wed, 25 Apr 2012 10:18:42 +0700

Hi.
I  use  TDIHtmlParser with TDIHtmlWriterPlugin and found the following
strange result when processing tags:
if  tag  has two attributes: first is empty (e.g. title=""), second is
not  empty  (e.g.  href="1.htm"),  then  deletion  of second attribute
causes that 1st (empty) attribute loses the ="" part and become in our
example simple "title" (without quotes).
May be it is not correct?
The DIHtmlWriterPlugin1.QuoteHtmlTags := qtAlways; does not helps.

example:
input: <a title="" href="1.htm">
output: <a title>

part of code:
while DIHtmlParser1.ParseNextPiece do
begin
DIHtmlParser1.HtmlTag.DeleteAt(1);
DIHtmlWriterPlugin1.WriteCurrentHtmlTag;
break;
end;

_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: