Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: img tags


AphelionZ
Participant

@aphelionz

Added this to the above function… still nothing

function outlet_encode_bad( $text ) {

$text = wp_specialchars($text);

$text = preg_replace('|<(/?strong)>|', '<$1>', $text);

$text = preg_replace('|<(/?em)>|', '<$1>', $text);

$text = preg_replace('|<(/?a.*?)>|', '<$1>', $text);

$text = preg_replace('|<(/?ol)>|', '<$1>', $text);

$text = preg_replace('|<(/?p)>|', '<$1>', $text);

$text = preg_replace('|<(/?img)>|', '<$1>', $text);

$text = preg_replace('|
|', '
', $text);

$text = preg_replace('|<(/?ul)>|', '<$1>', $text);

$text = preg_replace('|<(/?li)>|', '<$1>', $text);

$text = preg_replace('|<(/?blockquote.*?)>|', '<$1>', $text);

$text = preg_replace('|<(/?code)>|', '<$1>', $text);

$text = preg_replace(“|(.*?)|se”, “‘' . encodeit('$1') . '‘”, $text);

return $text;

}

add_filter( ‘encode_bad’, ‘outlet_encode_bad’, -1, 3);

There’s also the bb_autop function but that unfortunately is beyond me… I can barely understand regex as it is.

Anyone?

Skip to toolbar