浏览代码

fix my mistake

causefx 8 年之前
父节点
当前提交
36dc7d25bf
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      functions.php

+ 2 - 3
functions.php

@@ -4754,9 +4754,8 @@ function getPing($url, $style, $refresh = null){
 			$class .= " animated flash loop-animation-timeout";
 			$class .= " animated flash loop-animation-timeout";
 		}
 		}
 	}
 	}
-	if (strpos($style, '<') === false && strpos($style, '>') === false && strpos($style, 'script') === false) {
-		echo '<span class="pingcheck badge ping-'.$class.'" style="position: absolute;z-index: 100;right: 5px; padding: 0px 0px;'.$style.';font-size: 10px;">&nbsp;</span>';
-	}
+	$style = htmlspecialchars($style, ENT_QUOTES);
+	echo '<span class="pingcheck badge ping-'.$class.'" style="position: absolute;z-index: 100;right: 5px; padding: 0px 0px;'.$style.';font-size: 10px;">&nbsp;</span>';
 }
 }
 
 
 function speedTestData(){
 function speedTestData(){