If there’s no v2 API coming soon, then this definitely qualifies as a wish-list item, but I think it’s quite an important one.
Right now if a user puts line breaks in the notes field, the XML sent by the API looks like this:
<post href="http://www.reghardware.com/2012/01/26/iptv_week_netflix_vs_lovefilm_review/" time="2012-01-26T19:47:45Z" description="Netflix vs Lovefilm • reghardware" extended="Some notes.
Some more text." tag="test" hash="ccdab9c273ce6b422b7c9bf9cbec71d6" meta="9c2ae7bd41be4a676dbbf17f8f33e51c" shared="no" />
To be explicit: the return characters are placed directly in the attribute. Unfortunately, according to the XML spec:
“a whitespace character (#x20, #xD, #xA, #x9) is processed by appending #x20 to the normalized value”
(See section 3.3.3, http://www.xml.com/axml/testaxml.htm)
Anyone using a standard XML parser will find the returns converted into spaces. This happens in my iOS client and at least two of my competitors apps (my guess is all of them, but I don’t have a copy of all of them).
I don’t think this can be fixed without breaking the API. I’m no XML expert, but I suspect any field that can have returns in would have to be present as CDATA rather than an attribute?
Cheers,
--> Stephen
> --
> You received this message because you are subscribed to the Google Groups "Pinboard" group.
> To post to this group, send email to pinboa...@googlegroups.com.
> To unsubscribe from this group, send email to pinboard-dev...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pinboard-dev?hl=en.
>
------------------------------------------------------------------------
Stephen Darlington (www.zx81.org.uk)
"Thesaurus thief let off with reprimand, censure, rebuke, castigation..."
------------------------------------------------------------------------
Note that this applies only to literal linebreak and tab characters.
The editor of the XML spec Himself has called this broken as designed:
http://golem.ph.utexas.edu/~distler/blog/archives/000564.html#c002306
> I don’t think this can be fixed without breaking the API. I’m no XML
> expert, but I suspect any field that can have returns in would have to
> be present as CDATA rather than an attribute?
It can be done inside the attribute as long as you emit a NCR in
place of an actual linebreak character.
Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>
> > To unsubscribe from this group, send email to pinboard-dev+unsubscribe@googlegroups.com.