我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

英镑符号(£)和php htmlentities来阻止XSS

I have an html form where the user can put in a currency symbol. When the form is first submitted using the £ symbol it save correctly, but when the form reloads the value is £

So the second time it is saved it saves the entity and not the value

<input type="text" value="<?php echo htmlentities($currency_symbol); ?>" />

I am using htmlentities to prevent XSS, but this seems to be a problem. Any ideas?

近期文章

  • 订购php脚本执行
  • PHP显示为文本而不是应用程序
  • 处理未知状态代码[CakeException]未知状态代码
  • Symfony中的Doctrine用户实体:了解头像的位置
  • 从for循环中的数组中删除重复的id
  • Assign_block_vars在多维数组中
  • SimpleHTMLDom:有没有办法只解析某些代码行?
  • WooCommerce隐藏添加到购物车按钮循环和产品页面
  • 如何使用单选按钮在多维数组中保存默认值
  • 查询查询中返回奇怪的数据结构
  • 使用html5 getusermedia创建webm文件并将其发送到服务器
  • Drupal 6 - 从特定类别和子类别中获取节点
  • 可以在ios应用程序中获取我的亚马逊购物车吗?
  • 如何在Windows机器上调用带有事件的php文件?
  • too long
  • while循环重复记录按列数记录
  • 如何在动态数组中存储更新的库存数据
  • 如何在html和php中水平拆分大型动态List
  • 将Google App托管到自定义域后,联系我们表单无效
  • PHP以“双重免费或损坏”错误退出

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华