mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-04 07:44:01 +01:00
Test against converted UTF8 no BOM content
Convert content to UTF8 with no BOM before testing matches against it
This commit is contained in:
@@ -121,7 +121,7 @@ if (startTab!=top.ICEcoder.selectedTab) {
|
||||
$fullPath = $path.$slash.$f;
|
||||
if(is_dir($fullPath)) {
|
||||
$ret .= phpGrep($q, $fullPath, $base);
|
||||
} else if(stristr(file_get_contents($fullPath), $q)) {
|
||||
} else if(stristr(toUTF8noBOM(file_get_contents($fullPath),false), $q)) {
|
||||
$bFile = false;
|
||||
$foundInSelFile = false;
|
||||
for ($i=0;$i<count($ICEcoder['bannedFiles']);$i++) {
|
||||
@@ -136,7 +136,7 @@ if (startTab!=top.ICEcoder.selectedTab) {
|
||||
}
|
||||
if (!$bFile && (count($selectedFiles)==0 || count($selectedFiles)>0 && $foundInSelFile)) {
|
||||
$ret .= "<a href=\\\"javascript:top.ICEcoder.openFile('".$fullPath."');top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'))\\\">";
|
||||
$ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">Found ".substr_count(strtolower(file_get_contents($fullPath)),$q)." times</div>";
|
||||
$ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">Found ".substr_count(strtolower(toUTF8noBOM(file_get_contents($fullPath),false)),$q)." times</div>";
|
||||
if (isset($_GET['replace'])) {
|
||||
$ret .= "<div class=\\\"replace\\\" id=\\\"replace\\\" onClick=\\\"replaceInFileSingle('".$fullPath."');this.style.display=\'none\'\\\">replace</div>";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user