标签: javascript php html
目前在PHP中使用以下代码。
echo html_entity_decode($ productName); 

但是,如果此值类似于< script> alert(“Alert!”)< / script> ,这个脚本最终也会被执行。我想解码HTML而不允许运行脚本。
< script> alert(“Alert!”)< / script>