Commit c91bac68 authored by Son Nguyen's avatar Son Nguyen Committed by Robert Lyon
Browse files

Display cleaned content of XML file. Bug 1404117



Change-Id: I0dffc63f0ea10409c9ae18b9194a13a2287e0a7c
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent 70c938da
......@@ -55,7 +55,11 @@ function serve_file($path, $filename, $mimetype, $options=array()) {
$lastmodified = filemtime($path);
$filesize = filesize($path);
if ($mimetype == 'text/html' || $mimetype == 'text/xml' || $mimetype == 'application/xhtml+xml' || $mimetype == 'image/svg+xml') {
if ($mimetype == 'text/html'
|| $mimetype == 'text/xml'
|| $mimetype == 'application/xml'
|| $mimetype == 'application/xhtml+xml'
|| $mimetype == 'image/svg+xml') {
if (isset($options['downloadurl']) && $filesize < 1024 * 1024) {
display_cleaned_html(file_get_contents($path), $filename, $options);
exit;
......
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