Use iframe sandbox for rendering HTML in transformation
Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
c8297b4718
commit
14fd275811
@ -45,7 +45,9 @@ abstract class FormattedTransformationsPlugin extends TransformationsPlugin
|
||||
*/
|
||||
public function applyTransformation($buffer, $options = array(), $meta = '')
|
||||
{
|
||||
return $buffer;
|
||||
return '<iframe srcdoc="'
|
||||
. strtr($buffer, '"', '\'')
|
||||
. '" sandbox=""></iframe>';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -77,4 +79,4 @@ abstract class FormattedTransformationsPlugin extends TransformationsPlugin
|
||||
return "Formatted";
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user