开发者

HTML Option Tag with Value set as an Anchor

开发者 https://www.devze.com 2023-01-03 17:12 出处:网络
I am updating some super legacy code and I am unsure how to make this HTML5 compatible. <option value=\'<a href=\'http://localhost:8080/dm?id=&#037;&#037;SUBSCRIBER_ID_TAG&#037;&am

I am updating some super legacy code and I am unsure how to make this HTML5 compatible.

<option value='<a href='http://localhost:8080/dm?id=&#037;&#037;SUBSCRIBER_ID_TAG&#037;&#037;'>View in a browser window</a>'>Display Me开发者_如何学JAVAssage(HTML Version)</option>

I personally have never run across something like that so any help would be great.


Do you have access to the server side code? I'm presuming that somehow this value is populating a page.. I'd recommend you just pass the URL for the value, and in your server side code (or even if it's rendering in JavaScript) build link. Moreover, I suspect this code is highly susceptible to XSS, since it apparently renders whatever HTML is passed along.

0

精彩评论

暂无评论...
验证码 换一张
取 消