Slashdot Mirror


Obfuscated HTML Contest?

ptaff asks: "We all know the nightmare of typical HTML developer: you get different results on different browsers/platforms (and we're talking HTML only, no CSS/scripts). To make matters worse, MSIE has this ability to render completely invalid HTML code (missing tags, invalid nesting, you get the point). Mozilla and its many cousins are trying hard to keep up with the inconsistencies of today's 'web-optimized-for-MSIE', but where is the limit? As an exercise, can you build the most malformed HTML document that can be rendered in MSIE but will choke on others browsers?"

13 of 81 comments (clear)

  1. Theory & practise by RyoSaeba · · Score: 4, Insightful

    Well, i guess that's the difference between theoritical stuff (HTML standard) and the practical implementation (browsers)...
    Maybe also the time required for a feature to become standard HTML plays a role, think people are gonna wait some months to have a feature, when the browser (broken or anticipating the new standard) can make it already ?

    Isn't that after all also how the Internet itself works usually ? ie people do something in different ways, usually without any standard, or extending one, then some mix of everything becomes 'the' new standard (RFCs & so on) ?

    --
    Tsuyoikoto ha taisetsu da ne, dakedo namida mo hitsuyousa (Strength is an important thing, but tears too are necessary)
  2. You are in a maze of specialized tags, by Myself · · Score: 4, Interesting

    Why not make it render something different but valid in as many different browsers as possible?

    My sympathy goes out to the judges of this contest.

    1. Re:You are in a maze of specialized tags, by Koos+Baster · · Score: 3, Funny

      Great idea! Or invalid, but different.

      I mean, the winner of the original contest's question is already decided anyway: I'm sure nobody's as good as Microsoft in writing obfuscated code that runs only on their own platforms!

  3. Wanna see something really hairy? by 3-State+Bit · · Score: 3, Funny

    View source. Go ahead. Right now.
    I dare you to glance through it.
    You'll not sleep tonight.

  4. Just export a Word doc to HTML by redcliffe · · Score: 5, Funny

    That's totally obfuscated......

    1. Re:Just export a Word doc to HTML by ptomblin · · Score: 3, Informative

      I took a cut at modifying deMoronizer.pl to take the MS Word crap out of their generated HTML. You can find it at http://xcski.net/decrap/deCrapifier.pl_txt

      I make no guarantees that it works. Or that it's very well written, it was a quick and dirty hack.

      --
      The next Cmdr Taco duplicate will be ready soon, but subscribers can beat the rush and see it early!
  5. The code used to get the java plugin? by Bazzargh · · Score: 4, Funny
    I've always though this was fantastically obscure, and uses a hellish mix of applet, object, and embed tags to make things work. Remember what appears below is recommended practice!

    Old Style:

    <APPLET code=XYZApp.class codebase=html/ align=baseline width=200 height=200> <PARAM NAME=model VALUE=models/HyaluronicAcid.xyz> No Java 2 SDK, Standard Edition v 1.3 support for APPLET!! </APPLET>

    New Style:

    <EMBED type=application/x-java-applet;version=1.3 width=200 height=200 align=baseline code=XYZApp.class codebase=html/ model=models/HyaluronicAcid.xyz pluginspage=http://java.sun.com/products/plugin/1. 3/plugin-install.html> <NOEMBED><XMP> <APPLET code=XYZApp.class codebase=html/ align=baseline width=200 height=200></XMP> <PARAM NAME=java_code VALUE=XYZApp.class> <PARAM NAME=java_codebase VALUE=html/> <PARAM NAME=java_type VALUE=application/x-java-applet;version=1.3> <PARAM NAME=model VALUE=models/HyaluronicAcid.xyz> <PARAM NAME=scriptable VALUE=true> No Java 2 SDK, Standard Edition v 1.3 support for APPLET!! </APPLET></NOEMBED></EMBED> </OBJECT>
  6. Just use Microsoft's HTML obfuscator ... by jolshefsky · · Score: 5, Funny
    Step 1: type "Hello world." in a Microsoft Word document.

    Step 2: save as a web page.

    The result:

    <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word"
    xmlns="http://www.w3.org/TR/REC-html40">

    <head>
    <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
    <meta name=ProgId content=Word.Document>
    <meta name=Generator content="Microsoft Word 9">
    <meta name=Originator content="Microsoft Word 9">
    <link rel=File-List href="./Hello%20world_files/filelist.xml">
    <title>Hello world</title>
    <!--[if gte mso 9]><xml>
    <o:DocumentProperties>
    <o:Author>Administrator</o:Author>
    <o:LastAuthor>Administrator</o:LastAuthor&gt ;
    <o:Revision>1</o:Revision>
    <o:TotalTime>0</o:TotalTime>
    <o:Created>2002-12-12T13:01:00Z</o:Created&g t;
    <o:LastSaved>2002-12-12T13:01:00Z</o:LastSaved>
    <o:Pages>1</o:Pages>
    <o:Company>Yoyodyne Propulsion Systems, Inc.</o:Company>
    <o:Lines>1</o:Lines>
    <o:Paragraphs>1</o:Paragraphs>
    <o:Version>9.4402</o:Version>
    </o:DocumentProperties>
    </xml><![endif]-->
    <style>
    <!--
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
    {mso-style-parent:"";
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:"Times New Roman";
    mso-fareast-font-family:"Times New Roman";}
    @page Section1
    {size:8.5in 11.0in;
    margin:1.0in 1.25in 1.0in 1.25in;
    mso-header-margin:.5in;
    mso-footer-margin:.5in;
    mso-paper-source:0;}
    div.Section1
    {page:Section1;}
    -->
    </style>
    </head>

    <body lang=EN-US style='tab-interval:.5in'>

    <div class=Section1>

    <p class=MsoNormal>Hello world.</p>

    </div>

    </body>

    </html>
    Of course, it breaks the rules because it uses style sheets, but who's counting...
    --
    --- Jason Olshefsky

    Karma: Poser (mostly affected by adding this line long after everyone else did)

  7. How about this one... by Clover_Kicker · · Score: 5, Funny

    Here is a classic.

    It just looks dumb in Mozilla, but you can use IE to truly experience the horror.

    I believe this was originally designed as an object lesson that HTML email and usenet posts are a bad idea.

    There is no author identified, but I'd love to know who came up with this one.

    1. Re:How about this one... by belbo · · Score: 5, Informative

      In case someone doesn't get it - look at the source of the page.

      Nice one, thanks :).

      b.

      --

      --
      "Just believe everything I tell you, and it will all be very, very simple."

  8. not writing obfuscated - find it by HTD · · Score: 4, Interesting

    I think it's better to find pages that use such code. example - the www.europcar.com .de .fr pages the use a javascript menu that does ONLY work in MSIE on windows. No MacIE, Mozilla(choose your platform), Opera 7 or other alternative browsers. You simply cannot see the menu or cannot use it - therefore you cannot navigate. There are more pages out there, writing this code on purpose is pointless, because it has already been written ;) Find those pages and complain, make a publicly available list of invalid non-working HTML pages. Write the webmasters about your problems. And of course show workarounds so that those "programmers" can see and change their mistakes.

    A good reason for coding obfuscated (be it valid or invalid) HTML would be to create a repository of "real world" code for Browser developers out there to check if it works with their product. Then of course a "desired output" image should be attached to the code.

    Creating a blacklist of corporate pages using invalid html is my favourite idea, but the mentioned repository would help a lot coders out there...
  9. Re:The use of this excersise by Captain+Large+Face · · Score: 4, Insightful

    I strongly disagree. HTML standards are standards for a very good reason -- it allows ALL producers of HTML clients AND HTML editors to aim for a common goal.

    Following the "standards" as laid down by Internet Explorer will mean those writing HTML documents will continue in bad habits learnt during the so-called browser wars between Microsoft and Netscape. If you take 10 random sites and check the source code of the home page, I'd wager than none of them are using valid HTML 4, although the standard has been public for over four years!

  10. This is backwards... by Da+VinMan · · Score: 3, Interesting

    Obfuscated HTML?! Anyone can do that! Sorry, but most HTML out there is fairly crappy.

    Wouldn't an un-obfuscated HTML contest where the code is judged by how well it plays and demonstrates advanced features on multiple browsers be more challenging?

    Some reusable bits may actually come about as the result of this sort of contest.

    --
    Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!