- 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
Ironically, their old site wasn't too bad...
Admin
Brilant!!!
Admin
xsl:textW</xsl:text>xsl:textT</xsl:text>xsl:textF</xsl:text>xsl:text!</xsl:text>xsl:text?</xsl:text>
Any chance that was generated xslt code?
Admin
a truly brillant use of dom and xslt, that's for sure
poor tbody :(
Admin
Somewhere between 5th and 400th!
Admin
function AddComment(str) { AddCommentCore(str, true); }
fuction AddCommentCore(str, bAsComment) { AddCommentCoreCore(str, bAsComment, false, true); }
function AddCommentCoreCore(str, bAsComment, bFunny, bWTF) { AddCommentCoreCoreCore(.... }
Admin
(I'll get my coat)
Admin
A related fail: I visited the site in firefox on Ubuntu, on the page and in the window switcher the Hewbrew (Hebrew?) text showed up fine, but not in the title bar of Firefox.
Admin
Hmmm.
I revel in my ignorance and hope to avoid future understanding with a passion and will that would place me amongst the mightiest of trees.
shrug makes about as much sense as that code.
Admin
this.getGoggles.do(null)
Admin
At least the page looks okay, aesthetically speaking.
Admin
Admin
If you think those XSLTs are long, you've obviously never worked with SharePoint.
Admin
[image]
Admin
A good attempt at obfuscation maybe?
Admin
I stopped right here:
Admin
...That's just ASP.NET. It always does that.
Admin
AddCommentCoreCoreCore(str, bAsComment, bFunny, bWTF, bCheckValidChars){ Core(str, null, null, null, bAsComment, null, null, bFunny, null, bWTF, null, null, null, null, null, null, null, null, null, null, 1, null, true, null, ValidChars[60], null, null, null, null, null, NaN); }
Admin
Fortunately only the edgy browser elitist crowd will be inconvenienced. Phew, for a second I thought we had a problem.
Admin
Oh well, in that case...
WTF‽
Admin
Just look at this...
Look closer..
They're making the code CRY.
Admin
I'll see your line 63 and raise you line 3:
I'd love to see the HTML 4.01 (Transitional to boot!) DTD that particular validates in. Not forgetting that this will render in lovely quirks mode in IE6, if it can get past the 533 validation errors and 192 warnings. Oddly enough the English version only has 119 errors and 86 warnings...
Admin
Admin
Actually, that is not a WTF. It's an encrypted base64 string. It's a very good (and secure) way for asp.net to remember it's state.
Admin
Off your meds again?
Admin
Yeah, it comes out looking like crap. Everything right justified for some reason (even the sidebar items), and there's some raw markup sprinkled all over the page. And there's funky hieroglyphs all over the page where all the text should go!
Admin
Admin
Only those of the "edgy browser elitist crowd" who are going to go by train in Israel. So it's a corner case, I guess.
Admin
No, that's what cookies or, as a fallback, URL parameters and sessions are for. Hidden-form POSTed 16KB base64 encrypted strings are not A Very Good Way™. Well, maybe for ASP.NET they are...
Admin
I would guess the code is from some generator, you can also find it http://74.125.77.132/search?q=cache:kYcRKtpdeLwJ:www.eid.ac.cn/MirrorResources/5325/init.js%253Frev%3DVhAxGc3rkK79RM90tibDzw%3D%3D+LegalUrlChars+strleafname&cd=1&hl=en&ct=clnk
Admin
DOH!!! It is just standard SharePoint generated code.
Admin
I'm having trouble with this paragraph:
I'm guessing from the grammar that perhaps there's an encoding fail on the post? It looks like some of those < and > characters should be < and >.
Of course, I don't know if that will render properly, not knowing how this post will be encoded; if it's not, here's an alternate version of the previous sentence:
"It looks like some of those < and > characters should be < and >."
Admin
Viewstate is good for some things, but the size of that string (which is larger than it needs to be) implies that the folks on that website abuse it.
Admin
Nazi!
Admin
Seeing this makes one wish to escape properly
Admin
Note: Always use ltr, because ltr is ltr when written from left to right and .tfel ot thgir morf nettirw nehw ltr
CAPTCHA: saluto
Admin
Wait, this niether good, and by default it isn't even secure, so isn't this the real WTF?
Admin
The reason for the disable-output-escaping code is pretty obvious: xslt version 1 generates xml or html, but not xhtml. You need to follow the html compatibility guidelines (appendix C of the xhtml spec), which xslt1 processors aren't aware of. So
should be
, while
However, using xhtml in a new site is almost a WTF itself if you didn't need it - html4 works almost-fine across all browsers, xhtml doesn't without browser sniffing. (See http://hixie.ch/advocacy/xhtml ). If you're not embedding SVG, MathML, etc - what're you using it for? Sheer masochism?
Even if you use html4 you can end up needing to disable output escaping in xslt1. For example, if you have to deal with conditional comments (for which we must thank MS, again).
Admin
Mmm .... IE7 renders this correctly for me. However, my Firefox 3.0.7 offers to download a file of type ASPX for the linked page. It does look correct for the English page, though.
Maybe something to do with the 2 transparent proxies I am behind? Or just a weird MIME-type?
Admin
Even stranger ... after a few minutes, it started to work correctly for me. Wonder if someone was editing the source?
Admin
That HTML regexp doesn't take into consideration if the other mark comes after a linefeed.
HTML sucks to regexp unless you know it's formal somehow. Doable, though.
Admin
Viewstate is a good thing. Viewstate thrown back to the client on every page is stupid. With an exclamation point (!)
This just indicates the level of competence of the developers is slightly above that of a brick.
Admin
Nice flamebait. It's good to see that the world still has real coding heroes ;)
Admin
Admin
This is a WTF that I can really appreciate, as we're in the midst of rewriting an entire web application that uses XSLT. The previous version was based on JSP, Struts and Hibernate and despite being written by contractors it was pretty solid. Then my predecessors were taken on as permanent staf to replace the costly contractors. One was allegedly a DBA with some programming knowledge (he knew just about enough Perl to be dangerous and clearly hadn't understood anything about decent database design). The other was an XML wonk who had taken too much acid at university. I kid you not.
They both decided that they knew better than all those people espousing clean separation of architectural layers (data access, business logic and presentation) and believed they also didn't need a framework like Spring or Struts. As for JSP, that was for wimps - real men use XSLT, especially the bastard feature known as the document() call. They spent several years putting together an absolute doozy of a WTF that was slow, unstable and undocumented. JDBC code in Servlets, everything stored in HashMaps (beans were again for wimps) and on the fly conversion to XML. All in all, a classic example of how not to write a web application using that I thought we'd seen the back of in the last millenium.
The killer is XSLT though. It's overly complex, encompasses a number of overlapping and conflicting "standards" and in our case relies on the Saxon libraries that are written by a former mainframe hacker with a taste for premature optimisation and hardcoded limits. Getting web developers to work on the templates is a nightmare as XSLT experience is scarce and expensive. Just running the web application requires 2GB of RAM to be allocated to the JVM (versus 512MB that's proving more than adequate for the JSP version).
Thankfully, we'll be shot of the last XSLT code in a few weeks time.
Admin
People thing VIEWSTATE is OK?! With Viewstate, every link and button has a hidden post back. When I browse without JS, your site breaks. Many buttons/links cannot be targeted with ENTER, they must be clicked. VIEWSTATE is terrible.
Admin
Actually I would not say that array with all those trues and falses is necessarily a WTF.
It looks like a cached table to me. Might have been generated at one time by a script rather than someone actually going to the effort of writing it by hand.
Access time to the table is constant and pretty fast, and might be used in a critical operation.
Admin
XSLT has nothing to do with the DOM. The DOM is a very specific API for accessing, modifying, and creating XML documents; it is not a generic term for an XML document's structure.
Admin
I'm surprised the israeli web managed to stay off TDWTF radar for this long. You see, Israel is well known for its developers world wide. This credit may be warranted in some cases, but when it comes to the public face of Israel - The www, well...
We suck.
rail.co.il is just the tip of the iceberg. Their previous site was worse. it worked exclusively on IE, and badly at that. But they are not the only ones. The largest news site Ynet is a crappy pile of jumping ads and flash. just open the page to see your cpu usage soar. This unfortunate example is not isolated to this site either. Its really most of the israeli web. crappy, flash ridden, heavily and badly scripted pages. Even the government homepage uses annoying flash ads. Gov.il Most of the israeli web didn't work on anything but IE until recently, israeli gov site was one example until not long ago. you can check out israeli postal services for another heavy flash ridden website.
Oh, and there's also the brillant Israeli invention (i haven't seen it around the rest of the web, so i assume its also exclusive) - AddBoo(tm). Its a unique tech that plays a loud, annoying and surprising music when you pass over certain commircials. i invite you to try this special user torture (banner on the right)
Think Subjectively!
Admin
To be fair, they've recently diverted most of their resources previously allocated to web development towards killing Palestinians.