[wp-hackers] Preventing magic quotes in pre elements

Andrew Shearer ashearerw at shearersoftware.com
Fri Jul 23 03:59:26 UTC 2004


A problem with the <pre> avoidance built into texturize is that it only 
takes effect until the next tag, regardless of whether it's </pre>. So 
it won't help you if you have syntax-highlighted code, with <span> or 
<font> tags embedded in the <pre> element.

On Jul 22, 2004, at 11:46 PM, Matt Mullenweg wrote:

> Eric A. Meyer wrote:
>
>>    I've poked around the formatting functions file in an attempt to 
>> figure out how to prevent magic quoting for the 'pre' element (and, 
>> while I'm at it, 'code' and related inline elements).  I came away 
>> with an aching head, and no better clue than when I started.  Anyone 
>> want to point me in the right direction?
>
> Is your problem curly quotes or <br />s? There's a check inside 
> texturize for <pre> and other code type blocks, not sure why it 
> wouldn't be working.
>
> -- 
> Matt Mullenweg
>  http://photomatt.net | http://wordpress.org
> http://pingomatic.com | more soon...
>
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>

--
Andrew Shearer
Senior Analyst, Medical Computing
IS Applications Group
Lifespan




More information about the hackers mailing list