报价标记已突破值容器
我将SQL从SQL调用HTML代码为Textarea的“值”或 例如
<Input type=text value="<p>this is a website <a href="https://example.com>Click Here</a></p>"></input>
,现在的问题是“ HREF中的关闭值并未在文本框中显示完整数据。
文本方面也发生了同样的情况。
是否有其他方法可以将此HTML转换为可编辑的表单而不破坏网站。
我试图通过AJAX在SQL中更新SQL中的HTML代码,但我无法将代码从SQL检索到任何可编辑的文本输入中。
I am calling the html code from the SQL into a the "value" of Textarea or
For instance
<Input type=text value="<p>this is a website <a href="https://example.com>Click Here</a></p>"></input>
Now The problem is that The " in the href is closing the value and complete data is not displayed in the textbox.
Same is happening with the textarea.
Is there any other method to convert this html into editable form without breaking the website.
I am trying to update the html code in the SQL via a form through ajax. The update is working fine but i am unable to retrieve the code from the SQL into the any editable text input.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用单个引号,而不是外部
value
字段的双引号:您还可以尝试使用将逃脱双引号的JSON编码。
Use single quotes, instead of double quotes for the outer
value
field:You can also try using JSON encode which will escape the double quotes.