Re: HTML::Parser & tag</span></a></span> </h1> <p class="darkgray font13"> <span class="sender pipe"><a href="/search?l=libwww@perl.org&amp;q=from:%22Gisle+Aas%22" rel="nofollow"><span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Gisle Aas</span></span></a></span> <span class="date"><a href="/search?l=libwww@perl.org&amp;q=date:20041110" rel="nofollow">Wed, 10 Nov 2004 11:01:23 -0800</a></span> </p> </div> <div itemprop="articleBody" class="msgBody"> <!--X-Body-of-Message--> <pre>Alex Kapranoff &lt;[EMAIL PROTECTED]&gt; writes: &gt; As far as I can understand HTML::Parser simply ignores closing &gt; &lt;/plaintext&gt; tag. I read the tests and Changes so I see that this is &gt; intended behaviour and &lt;plaintext&gt; is special-cased of all CDATA &gt; elements. &gt; &gt; Does someone know the reasoning of this decision? :) It is just plain &gt; interesting.</pre><pre> A long time ago the HTTP protocol did not have MIME-like headers. The client sent a &quot;GET foo&quot; line and the server responded with HTML and then closed the connection. Since there was no way for the server to indicate any other Content-Type than text/html the &lt;plaintext&gt; tag was introduced so that text files could be served by just prefixing the file content with this tag. This was before the &lt;img&gt; tag was invented so luckily we don't have a similar unclosed &lt;gif&gt; tag :) &gt; Does HTML::Parser imitate some old browser here? Yes, it was there in the beginning but still seems well supported. Of my current browsers both Konqueror and MSIE support this. Firefox support it in the same way as &lt;xmp&gt;, i.e. it allow you to escape out of it with &lt;/plaintext&gt;. The &lt;plaintext&gt; tag is described in this historic document: <a href="http://www.w3.org/History/19921103-hypertext/hypertext/WWW/MarkUp/Tags.html#7">http://www.w3.org/History/19921103-hypertext/hypertext/WWW/MarkUp/Tags.html#7</a> &gt; It results in weird effects for me as I write a HTML sanitizer for &gt; WebMail. Howcome? Do you have a need to suppress this behaviour in HTML::Parser? Regards, Gisle </pre> </div> <div class="msgButtons margintopdouble"> <ul class="overflow"> <li class="msgButtonItems"><a class="button buttonleft " accesskey="p" href="msg05340.html">Previous message</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="c" href="index.html#05354">View by thread</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="i" href="maillist.html#05354">View by date</a></li> <li class="msgButtonItems textalignright"><a class="button buttonright " accesskey="n" href="msg05355.html">Next message</a></li> </ul> </div> <a name="tslice"></a> <div class="tSliceList margintopdouble"> <ul class="icons monospace"> <li class="icons-email"><span class="subject"><a href="msg05340.html">HTML::Parser &amp; &lt;plaintext&gt; tag</a></span> <span class="sender italic">Alex Kapranoff</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg05355.html">Re: HTML::Parser &amp; &lt;plaintext&gt; tag</a></span> <span class="sender italic">Gisle Aas</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg05355.html">Re: HTML::Parser &amp; &lt;plaintext&gt; tag</a></span> <span class="sender italic">Alex Kapranoff</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg05362.html">Re: HTML::Parser &amp; &lt;plaintext&gt; tag</a></span> <span class="sender italic">Alex Kapranoff</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg05356.html">Re: HTML::Parser &amp; &lt;plaintext&gt; t...</a></span> <span class="sender italic">Gisle Aas</span></li> </ul> </ul> </ul> </ul> </ul> </div> <div class="overflow msgActions margintopdouble"> <div class="msgReply" > <h2> Reply via email to </h2> <form method="POST" action="/mailto.php"> <input type="hidden" name="subject" value="Re: HTML::Parser &amp; &lt;plaintext&gt; tag"> <input type="hidden" name="msgid" value="lrwtwt7e8k.fsf@caliper.activestate.com"> <input type="hidden" name="relpath" value="libwww@perl.org/msg05354.html"> <input type="submit" value=" Gisle Aas "> </form> </div> </div> </div> <div class="aside" role="complementary"> <div class="logo"> <a href="/"><img src="/logo.png" width=247 height=88 alt="The Mail Archive"></a> </div> <form class="overflow" action="/search" method="get"> <input type="hidden" name="l" value="libwww@perl.org"> <label class="hidden" for="q">Search the site</label> <input class="submittext" type="text" id="q" name="q" placeholder="Search libwww"> <input class="submitbutton" name="submit" type="image" src="/submit.png" alt="Submit"> </form> <div class="nav margintop" id="nav" role="navigation"> <ul class="icons font16"> <li class="icons-home"><a href="/">The Mail Archive home</a></li> <li class="icons-list"><a href="/libwww@perl.org/">libwww - all messages</a></li> <li class="icons-about"><a href="/libwww@perl.org/info.html">libwww - about the list</a></li> <li class="icons-expand"><a href="/search?l=libwww@perl.org&amp;q=subject:%22Re%5C%3A+HTML%5C%3A%5C%3AParser+%5C%26+%3Cplaintext%3E+tag%22&amp;o=newest&amp;f=1" title="e" id="e">Expand</a></li> <li class="icons-prev"><a href="msg05340.html" title="p">Previous message</a></li> <li class="icons-next"><a href="msg05355.html" title="n">Next message</a></li> </ul> </div> <div class="listlogo margintopdouble"> </div> <div class="margintopdouble"> </div> </div> </div> <div class="footer" role="contentinfo"> <ul> <li><a href="/">The Mail Archive home</a></li> <li><a href="/faq.html#newlist">Add your mailing list</a></li> <li><a href="/faq.html">FAQ</a></li> <li><a href="/faq.html#support">Support</a></li> <li><a href="/faq.html#privacy">Privacy</a></li> <li class="darkgray">lrwtwt7e8k.fsf@caliper.activestate.com</li> </ul> </div> </body> </html>