- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
<CommandLine>%26lt%3Bcomment%26gt%3Becho+%26quot%3BFRIST%26quot%3B%26lt%3B%2Fcomment%26gt%3B</CommandLine>
Admin
Possibly this element was generated by an automatic XML generator which was first passed through a sanitation method which did a "do while" until all instances of pesky escape characters are translated. I saw something similar in the early days of development of a female dog of a system in which one of the developers was "clever". And by "clever" I mean both "special" and "certified".
Admin
new comment here
Admin
Obligatory pedantic comment: you actually can't store anything you want in CDATA. At least in XML 1.0, which is what everybody still uses, and which doesn't like certain non-printing characters, no matter where they appear in the document. What sucks is that some early serializers would write these non-printing characters, and the parser written by the same team would reject them.
Admin
Reminds me a bit of https://xkcd.com/1638/ (Backslashes)
Admin
The article source is TRWTF:
<CommandLine>&lt%3bPATH&gt%3bSOME_VALUE_HERE&lt%3b/PATH&gt%3b</CommandLine>
Admin
@kdgregory completely agree - if the data is arbitrary clean you unfortunately need to base-64 encode (or similar)
Admin
"But, it also means..." you really, really need an editor. Or patience. Or text-to-speech these back to yourself. For the love of God.
Admin
this reminds me of a scene in an old online comic "absurd notions": a small group of programmers tried to write their own operating system, and called it "tostds"..."the OS that doesn't suck".
Admin
http://www.jarnot.com/archives/2013/05/ode-to-a-shipping-label.php
ODE TO A SHIPPING LABEL
Once there was a little o, with an accent on top like só.
It started out as UTF8, (universal since ’98), but the program only knew latin1, and changed little ó to “ij” for fun.
A second program saw the “ij” and said “I know HTML entity!” So “ij” was smartened to “&ATILDE;&SUP3;” and passed on through happily.
Another program saw the tangle (more precisely, ampersands to mangle) and thus the humble “&TILDE;&SUP3;” became “&ATILDE;&SUP3;”
Admin
Given the URL encoding, I have to wonder if it's HTML? You can nest XML within XML, but there's a special layer of hell for those who attempt to nest HTML within XML.
Admin
Just for the record, I am NOT THAT "Carl W"
Admin
Even if it's HTML, CDATA would be adequate. That's what the JSF UI framework does – AJAX-messaging is all XML, but those messages usually contain blocks of UI that were rendered into HTML and JS on the server and returned to the browser for splicing into the page. Those blocks are always CDATA encoded, since the HTML can't safely be treated as nested XML.
Admin
I had to manually work around this just a week or two ago - someone had managed to get a chr(5) into an XML document I had to read, and my parser flatly refused to deal with it.
I wound up doing one run for the days prior to that document, another run for the days after that document, then I did a request in SoapUI for the offending date, grabbed the output, stripped the junk character, and converted it into SQL statements to update the affected records directly. (I did try making a copy of the process that read from a flat file, but somehow even though I let it build its XML definition from the exact file I was trying to read, it failed to read any data from it.)
Admin
Those are both very very handy and work great in their target domains. Sound like sliding in some sour grapes and doesn't really pertain to the WTF. :/
Admin
"CDada"
I liked it.
Admin
I like how the title is a reference to Dadaism, a movement in art.
Admin
I like how the title is a reference to Dadaism, a movement in art.