Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^3: Distinguish between HTML and Plain text

by ikegami (Pope)
on Sep 26, 2011 at 23:36 UTC ( #927977=note: print w/ replies, xml ) Need Help??

in reply to Re^2: Distinguish between HTML and Plain text
in thread Distinguish between HTML and Plain text

This is HTML:

Please use <code>...</code> tags around your code.

This is text:

Please use <code>use strict;</code> in your code.

How can one possibly correctly identify them programatically?

PS - This is the reason Atom is better than RSS. RSS doesn't provide a mean of specifying the content type, so it can't distinguish between text and HTML content. Clients have to guess. You could take a peek at how RSS clients do it, but I suspect they might work with less ambiguous content than you.

Comment on Re^3: Distinguish between HTML and Plain text
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://927977]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2016-02-12 02:02 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (386 votes), past polls