【发布时间】:2010-01-28 22:30:50
【问题描述】:
我正在这样做:
<a href="http%3A%2F%2Flocalhost%3A8080%2Fnews.xhtml%3Fid%3D32%26lang%3Den" target="_blank" />
当它被渲染时,链接指向:http://localhost:8080/news.xhtml?id=32&lang=en
我需要这个链接指向编码的 url 而不是解码的。
有谁知道如何逃脱它?
更新(根据 cmets):我需要它来实现 Share this on facebook 功能。方法是调用以下链接:http://facebook.com/sharer.php?u=<encoded url to share>
【问题讨论】:
-
以后请在问题中添加更多context,以便整个功能需求清晰,而不是问半个问题;)