[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: how do I deal with special characters?
From:       David Narvaez <david.narvaez () computer ! org>
Date:       2012-10-27 6:56:46
Message-ID: CACFh1D7=Up8r4D32PcjBke9Lk7kULHt+btvTRCoWUPCDycSZwg () mail ! gmail ! com
[Download RAW message or body]

On Fri, Oct 26, 2012 at 8:07 PM, Eric Mesa <ericsbinaryworld@gmail.com> wrote:
> So the input data looks like:
> <photo><title>one side clear & one \
> snowy</title><id>8441049</id><views>318</views><URL>http://www.flickr.com/photos/eri \
> csbinaryworld/8441049/</URL><JPEG>farm1.staticflickr.com/8/8441049_6d70c1faac_m.jpg</JPEG></photo><
>  
> There are plenty of non-alpha numeric characters that work, but apparently there is \
> an issue with ampersands (&).  Perhaps I can just write some code to get rid of \
> those.

There's plenty of code that deals with that. In general, you never
want to write XML without proper escaping first; in this case escaping
could actually happen at the XmlListModel level. For a quick fix,
escape all of the string() values below.

> The function it's going into is:
> 
> 
> XmlListModel{
> id:feedModel
> xml:  window.currentGroup
> query: "/photos/photo"
> XmlRole { name: "title"; query: "title/string()"}
> XmlRole { name: "views"; query: "views/string()"}
> XmlRole { name: "url"; query: "URL/string()"}
> XmlRole { name: "jpeg"; query: "JPEG/string()"}
> XmlRole { name: "photo"; query: "id/string()"}
> }

David E. Narvaez
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic