Escaping Attributes with Builder::XmlMarkup

Discussion in 'Ruby' started by Daniel Sheppard, Oct 28, 2005.

  1. ------_=_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.cgi/builder/lib/builder/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--
     
    Daniel Sheppard, Oct 28, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Cox

    Combining XmlMarkup objects?

    Andrew Cox, Jun 9, 2005, in forum: Ruby
    Replies:
    2
    Views:
    212
    Andrew Cox
    Jun 10, 2005
  2. Farrel Lifson
    Replies:
    4
    Views:
    163
    Farrel Lifson
    Jul 19, 2006
  3. ted
    Replies:
    2
    Views:
    141
  4. M. Ayhan
    Replies:
    0
    Views:
    90
    M. Ayhan
    Dec 3, 2008
  5. Raimon Fs
    Replies:
    0
    Views:
    130
    Raimon Fs
    Jun 19, 2010
Loading...

Share This Page