Commit 68c7cb0a by Chris Wilson

Properly escape parameters to Dwoo "a" blocks.

parent d3caa8b3
......@@ -73,10 +73,14 @@ abstract class Dwoo_Plugin
$out .= ' '.$attr.'=';
if (trim($val, '"\'')=='' || $val=='null') {
$out .= str_replace($delim, '\\'.$delim, '""');
// $out .= ' '.$delim.'.htmlentities('.$attr.').'.$delim.'=';
} elseif (substr($val, 0, 1) === $delim && substr($val, -1) === $delim) {
$out .= str_replace($delim, '\\'.$delim, '"'.substr($val, 1, -1).'"');
} else {
$out .= str_replace($delim, '\\'.$delim, '"') . $delim . '.'.$val.'.' . $delim . str_replace($delim, '\\'.$delim, '"');
// $out .= str_replace($delim, '\\'.$delim, '"') . $delim . '.'.$val.'.' . $delim . str_replace($delim, '\\'.$delim, '"');
$out .= str_replace($delim, '\\'.$delim, '"') .
$delim . '.htmlentities(' . $val . ').' . $delim .
str_replace($delim, '\\'.$delim, '"');
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment