在网上看到icecoder这个小东西,是一个基于web的编辑器,很不错。唯一的缺点是打开的文件中汉字会变成乱码。

经查看源代码,在lib/file-control.php中,第89行是:

echo '</script><textarea name="loadedFile" >'.htmlentities($loadedFile).'</textarea><script>';

原来如此,htmlentities会把汉字变成乱码,换成功能类似的htmlspecialchars:
echo '</script><textarea name="loadedFile" >'.htmlspecialchars($loadedFile).'</textarea><script>';

问题解决,暂时没有异常出现。

相关文章:

  • 2021-12-05
  • 2022-01-15
  • 2021-12-01
  • 2021-11-29
  • 2022-01-15
  • 2022-02-23
  • 2021-11-27
  • 2021-07-26
猜你喜欢
  • 2021-05-02
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2022-01-04
  • 2021-12-06
  • 2021-12-11
相关资源
相似解决方案