Skip to content
Permalink
Browse files

build diffs/previews: treat htm(l) as text files

  • Loading branch information...
bloerwald committed Aug 12, 2019
1 parent 6595f44 commit ab99240a74eb114ade0c3b49bd79a71bc8ed92f7
Showing with 5 additions and 3 deletions.
  1. +4 −2 builds/diff_new.php
  2. +1 −1 files/scripts/preview_api.php
@@ -132,11 +132,13 @@ function actionToBadge(action){
}
break;
case "blp":
case "htm":
case "html":
case "lua":
case "xsd":
case "xml":
case "sbt":
case "toc":
case "xml":
case "xsd":
content = "<a style='cursor: pointer' data-toggle='modal' data-target='#previewModal' onClick='fillDiffModal(\"<?= $fromBuild['hash'] ?>\", \"<?= $toBuild['hash'] ?>\", \"" + full.id + "\")'>Preview</a>";
break;
default:
@@ -78,7 +78,7 @@ function downloadFile($params, $outfile){
<div class="tab-pane" id="raw" role="tabpanel" aria-labelledby="raw-tab"><pre style='max-height: 500px;'><code><?=htmlentities($output)?></pre></code></div>
</div>
<?php
}else if($type == "xml" || $type == "xsd" || $type == "lua" || $type == "toc"){
}else if($type == "xml" || $type == "xsd" || $type == "lua" || $type == "toc" || $type == "htm" || $type == "html" || $type == "sbt"){
echo "<pre style='max-height: 500px;'><code>".htmlentities(file_get_contents($tempfile))."</pre></code>";
}else{
// dump via hd

0 comments on commit ab99240

Please sign in to comment.
You can’t perform that action at this time.