Village Pump:Home/Syntax Highlighting ( archived 2009-06-18 ): Difference between revisions

→‎Inconsistent content model: htmlentities, htmlspecialchars
(→‎Inconsistent content model: htmlentities, htmlspecialchars)
Line 270:
On the other hand, treating the content literally does have the advantage of making it easier to paste in examples containing <s.
--[[User:Kevin Reid|Kevin Reid]] 00:36, 9 February 2009 (UTC)
: I can fix that inconsistency by feeding the source code snippet through the PHP htmlentities or htmlspecialchars functions, so they show up literally. Of course, if <code> obviates that need, I can use that instead of <pre>. If I do that, though, any code example for an unsupported language already using an HTML entity as a workaround is going to break. --[[User:Short Circuit|Short Circuit]] 05:21, 9 February 2009 (UTC)
 
== Code tag special behaviour ==