spelling with <g>?
Michel Fortin
michel.fortin at michelf.com
Wed Feb 20 07:17:44 EST 2008
Le 2008-02-20 à 1:19, Petite Abeille a écrit :
> On Feb 20, 2008, at 4:30 AM, Michel Fortin wrote:
>
>> Markdown specifically allows you to use HTML in the middle of your
>> prose. <g> looks like an HTML tag, Markdown recognize it as such,
>> and you get it as an HTML tag in the output.
>
> Hmmm... yes... but... <g> is not a HTML tag... shouldn't it be
> escaped automatically much in the same way as < g > would?
Well, if you saw <g> in the middle of an HTML document you'd think of
it as a tag, undefined and of of unknown semantics perhaps, but a tag
anyway.
Should markdown only allow a certain list of HTML tags based on the
HTML specification? I think it'd be inconsistent to have <a> and <b>
give different results than <c> and <d>. Also note that some people do
use tags which aren't specified in any standard -- to use browser-
specific features for instance, or as markup for chained HTML
preprocessors -- and that standards *do* changes over time. For all
these reasons, I don't think whitelisting a specific set of tag names
is a good idea.
Now, it's true that the <g> solution doesn't looks too appealing. I
think it'd be much better if you could write: \<g> when you need to
have a litteral "tag". Another solution would be to use something like
PHP Markdown's no-markup mode, where tags are plain and simply
disallowed, with the disadvantage that it would make the text less
"portable" between different Markdown implementations.
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Markdown-Discuss
mailing list