rawurlencode on $thisURL

This commit is contained in:
Adrien MALINGREY 2024-10-22 02:09:59 +02:00
parent c174b3a142
commit bfb7788df0

View File

@ -41,7 +41,7 @@ $xml = new DOMDocument();
$xml->load($tempPath);
`rm "$tempPath"`;
$thisURL = $options["saveAs"]?? false ? "$BASEDIR/$SCANSDIR/{$options["saveAs"]}.xml" : "";
$thisURL = $options["saveAs"]?? false ? "$BASEDIR/$SCANSDIR/".rawurlencode($options["saveAs"]).".xml" : "";
$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='thisURL' value='".htmlentities($thisURL, ENT_QUOTES)."'"), $xml->documentElement);
foreach ($options as $option => $value) {
if (substr($option, 0, 1) != '-') {