Reputation: 2809
I can easily navigate the second link but when I try to navigate first link, I'm directed to the wrong url. Here is the code:
StringBuilder footerBuffer = new StringBuilder();
footerBuffer.append("<b>Init:</b> http://127.0.0.1:8080/ABC/init/library?bookId=173&auth=1568&delta=yes <br/>");
footerBuffer.append("<b>Home:</b> https://127.0.0.1:8443/ABC <br/>");
footer.setText(Html.fromHtml(footerBuffer.toString()));
The url that I'm directed for the first url is:
http://127.0.0.1:8080/ABC/init/library?bookId=173&auth=1568%CE%B4=yes
I see %CE%B4
in spite of &delta
. What could be the problem?
Upvotes: 0
Views: 70
Reputation: 118
Because δ
is character reference name for δ
, see http://www.whatwg.org/specs/web-apps/current-work/multipage/named-character-references.html#entity-delta.
You should escape characters with Html.escapeHtml()
or whatever. Html.escapeHtml()
requires API level 16 or above. If you want to work on lower API level, see Apache Commons Lang.
Upvotes: 1
Reputation: 805
δ
is a HTML special character (like &
and so on) - I believe that &delta is converted to the url encoding of the delta character. You could try using %26 (which is the url-encoded value of &) instead of the ampersand for the delta parameter.
Upvotes: 1