Link tag regex incorrect (Fix included)
Status: Abandoned
Brought to you by:
renatoac
Using version 3.0.2beta.
This tag gets the following error:
<link rel="stylesheet" href="wizard/wizard.css" type="text/css" />
[29-Feb-2008 15:16:46] PHP Warning: file_get_contents(wizard/wizard.css" type="text/css) [function.file-get-contents]: failed to open stream: Invalid argument in .../html2fpdf.php on line 2211
This is due to the regex on line 2182 being incorrect. Instead of:
$regexp = '/<link rel="stylesheet".*?href="(.+?)"\\s*?\/?>/si';
It should be:
$regexp = '/<link rel="stylesheet".*?href="([^"]+?)"\\s*?\/?>/si';
What is changed is that instead of being ".+?" it is changed to "[^"]+?", meaning everything but ".