gpt4 book ai didi

HTML 表格将值 < 和 > 显示为文本 < >

转载 作者:行者123 更新时间:2023-11-29 17:52:48 24 4
gpt4 key购买 nike

我有一件奇怪的事情。我在 mysql View 列中定义了链接。

CONCAT(
'<a href=\'infoloan/',
sms.loan_id,
'\'>#</a>') AS `linkToLoan`

一切看起来都很好。
enter image description here

但随后在网络中它显示为文本而不是我的链接。
enter image description here

这是因为 < 在 json 响应中被解析为 < 和 > 为 >
可以说:

"&lt;a href=&#39;infoloan/22380&#39;&gt;#&lt;/a&gt;"

enter image description here

如何使网页正确显示。

最佳答案

如果您可以在 JSON 解析器之前控制数据,那么我会使用 html_entity_decode() 对其进行解码

关于HTML 表格将值 < 和 > 显示为文本 < >,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49161326/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com