#2 Render <- correctly

open
nobody
None
5
2004-11-17
2004-11-17
Dieter
No

&lt;-, to be displayed as <-, kills the parser because it
believes there is an open < that is not closed.

The following patch helps, but I have not tested it for
side effects: In html2pdf.php, move the AdjustHTML
down after the strip_tags.

function WriteHTML($html)
{
//! @desc HTML parser
//! @return void
/* $e == content */
if (!$this->usetitle)
{
$regexp = '/<title>.*?<\/title>/si'; //
eliminate <TITLE> content </TITLE>
$html = preg_replace($regexp,'',$html);
}
// AdjustHTML($html,$this->usepre); // Moved below,
menne, to allow <- as string
$html = $this->CreateInternalLinks($html);
if ($this->usecss) $html = $this->ReadCSS($html);
//Add new supported tags in the DisableTags
function
$html=strip_tags($html,$this-
>enabledtags); //remove all unsupported tags, but the
ones inside the 'enabledtags' string
AdjustHTML($html,$this->usepre); // Moved here,
menne
$a=preg_split('/<(.*)>/U',$html,-
1,PREG_SPLIT_DELIM_CAPTURE); //explodes the string

Discussion