[wp-trac] Re: [WordPress Trac] #3035: wpautop breaks object tags
WordPress Trac
wp-trac at lists.automattic.com
Wed Sep 13 14:44:18 GMT 2006
#3035: wpautop breaks object tags
-----------------------------------------+----------------------------------
Reporter: bwooster47 | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: General | Version:
Severity: normal | Resolution:
Keywords: wpautop breaks object embed |
-----------------------------------------+----------------------------------
Comment (by Tjworld):
This is a bug of sorts in wpautop() in the file /wp-includes/functions-
formatting.php
I patched to to work for Google Video embedded Flash player tags.
The simple fix is as follows:
In `function wpautop($pee, $br = 1) {`
Add "object|" to three of the regular expressions.
The expressions are the first two that begin:
`$pee = preg_replace('!(<(?:table|thead|tfoot|`
which, after inserting "object|" before "table" become:
`$pee = preg_replace('!(<(?:object|table|thead|tfoot|`
Next, find the line that begins:
`if ($br) $pee = preg_replace(`
And on the following line:
`$pee = preg_replace('!(</?(?:table|thead|`
insert "object|" before "table" so it becomes:
`$pee = preg_replace('!(</?(?:object|table|thead|`
You can apply the same principle to some other tags that are mangled by
the auto-formatting.
--
Ticket URL: <http://trac.wordpress.org/ticket/3035>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list