gpt4 book ai didi

jquery - 我的链接变成了特殊字符

转载 作者:行者123 更新时间:2023-12-01 02:47:47 25 4
gpt4 key购买 nike

我正在开发一个应用程序,他们使用reg 作为名称。在这里我遇到了问题,例如我有这样的链接 http://test.com?fname=#attributes.fname# ®=#attributes.reg#

但是当尝试单击该链接时,url 变量 ® 会变成特殊字符,无法解决此问题。

我将如何创建链接而不将 ® 转换为特殊字符。

谢谢

最佳答案

在 href 中,& 符号应该是 html 编码,URL 参数应该是 URL 编码,将 & 转换为实体

http://test.com?fname=#urlEncodedFormat(attributes.fname)#&reg=#urlEncodedFormat(attributes.reg)# 

应该做

w3 html recommendation about URIs in links

关于jquery - 我的链接变成了特殊字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7354544/

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