Recent Topics

1 Feb 09, 2005 21:12    

I am having difficulty getting html special characters, such as ' or $ to display properly in posts. Formatting html checker is turned on, and the characters appear in the $bs_htmltrans array. Instead they keep appearing as &apos : in the post itself.

2 Feb 10, 2005 21:12

It appears that the following chage to the file /public_html/b2evocore/_functions.php will solve the problem

At about line 286

if( $flag == 'html' )
{ // we can use entities
// Convert & chars that are not used in an entity
$content = preg_replace('/&(?![#A-Za-z0-9]{2,20};)/', '&', $content);
<ADD THIS>
// Convert HTML entities to urefs: added by jwn 2/10/05 to ensure html checking
$content = strtr($content, $b2_htmltrans);
<END ADD THIS>
}
else
{ // unicode, xml...
// Convert & chars that are not used in an entity
$content = preg_replace('/&(?![#A-Za-z0-9]{2,20};)/', '&', $content);

// Convert HTML entities to urefs:
$content = strtr($content, $b2_htmltrans);
}

For reasons that are not clear to me the code specifically leaves out the character substitutions of $b2_htmltrans when the content is of type html. It would appear that this is wher it would most be needed.


Form is loading...