Fixed handling of relative URIs in <base/> tags

This commit is contained in:
y.st 2016-02-19 14:30:03 -08:00
parent 8deb423ee2
commit 5de49bcda4

View File

@ -252,6 +252,11 @@ while($continue_loop):
// Those lazy fools wrote bad markup and put errors in our buffer.
// We should clear them.
libxml_clear_errors();
/**
* If we set the document URI, the base URI resolver is able to handle
* <base/> tags that specify a relative base.
**/
$DOMDocument->documentURI = $URI;
/**
* This is just a little witchery to find the base URI only once
* instead of having to find it again for each <a/> tag. If we used the