mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Now frame-less phpinfo page is valid XML. Part of MDL-7861
This commit is contained in:
parent
3facbe6632
commit
629b635dc4
@ -20,8 +20,14 @@
|
|||||||
$html = ob_get_contents();
|
$html = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
|
/// Delete styles from output
|
||||||
$html = preg_replace('#(\n?<style[^>]*?>.*?</style[^>]*?>)|(\n?<style[^>]*?/>)#is', '', $html);
|
$html = preg_replace('#(\n?<style[^>]*?>.*?</style[^>]*?>)|(\n?<style[^>]*?/>)#is', '', $html);
|
||||||
$html = preg_replace('#(\n?<head[^>]*?>.*?</head[^>]*?>)|(\n?<head[^>]*?/>)#is', '', $html);
|
$html = preg_replace('#(\n?<head[^>]*?>.*?</head[^>]*?>)|(\n?<head[^>]*?/>)#is', '', $html);
|
||||||
|
/// Delete DOCTYPE from output
|
||||||
|
$html = preg_replace('/<!DOCTYPE html PUBLIC.*?>/is', '', $html);
|
||||||
|
/// Delete body and html tags
|
||||||
|
$html = preg_replace('/<html.*?>.*?<body.*?>/is', '', $html);
|
||||||
|
$html = preg_replace('/<\/body><\/html>/is', '', $html);
|
||||||
|
|
||||||
echo $html;
|
echo $html;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user