Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Escaping Attributes with Builder::XmlMarkup

Reply
Thread Tools

Escaping Attributes with Builder::XmlMarkup

 
 
Daniel Sheppard
Guest
Posts: n/a
 
      10-28-2005
------_=_NextPart_001_01C5DB5C.041997EC
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Just hit a problem using FeedTools where links with ampersands in them
were being left unescaped in the output. I realised this was a
Builder::XmlMarkup thing, and patched it there, but when I went to the
Builder::XmlMarkup CVS to see what was going on there, I found this:

http://rubyforge.org/cgi-bin/viewcvs...er/xmlmarkup.r
b.diff?r1=3D1.3&r2=3D1.4&cvsroot=3Dbuilder

It seems that a new option has already been added to Builder::XmlMarkup
to escape XML attributes, but that it defaults to false. Is there a
reason for this? I was sure that <element attr=3D"value&value"> was not
well-formed XML, and should read <element attr=3D"value&amp;value"> - why=

is that not the default behaviour?

So, which library needs to be fixed? Builder or FeedTools?

(BTW - this is affecting the xml reprocessing in the CVS version of
MouseHole - so _why you might want to keep an eye on this).

################################################## #######################=
############
This email has been scanned by MailMarshal, an email content filter.
################################################## #######################=
############

------_=_NextPart_001_01C5DB5C.041997EC--


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Escaping the & in Attributes.Add() Nathan Sokalski ASP .Net 3 10-02-2007 10:41 PM
Escaping the & in Attributes.Add() Nathan Sokalski ASP .Net Web Controls 3 10-02-2007 10:41 PM
class attributes & data attributes james_027 Python 2 06-20-2007 03:12 PM
WebControl.Attributes.Add and custom attributes P4trykx ASP .Net 2 01-31-2007 04:33 PM
Parse reserved attributes as normal attributes Max XML 1 09-22-2006 12:04 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57