Skip to:
Content

Changeset 1981


Ignore:
Timestamp:
03/11/09 12:02:52 (5 years ago)
Author:
sambauers
Message:

Fix poor handling of ampersands within code blocks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-includes/functions.bb-formatting.php

    r1935 r1981  
    3030    $text = str_replace(array("\r\n", "\r"), "\n", $text); 
    3131    $text = preg_replace("|\n\n\n+|", "\n\n", $text); 
     32    $text = str_replace('&', '&', $text); 
    3233    $text = str_replace('<', '<', $text); 
    3334    $text = str_replace('>', '>', $text); 
     
    4546    $text = str_replace('<p>', '<coded_p>', $text); 
    4647    $text = str_replace('</p>', '</coded_p>', $text); 
    47     $text = str_replace('&#38;', '&', $text); 
     48    $text = str_replace(array('&#38;','&amp;'), '&', $text); 
    4849    $text = str_replace('&#39;', "'", $text); 
    4950    if ( '<pre><code>' == $matches[1] ) 
Note: See TracChangeset for help on using the changeset viewer.