Description
For example:
String url = "/path/book#chapter1";
HstLinkCreator linkCreator = request.getRequestContext().getHstLinkCreator();
HstLink link = linkCreator.create(url, request.getRequestContext().getResolvedMount().getMount());
if (link != null) {
url = link.toUrlForm(request.getRequestContext(), false);
}
Now url will be "http://site.com/path/book%23chapter1" instead of "http://site.com/path/book#chapter1"
See http://www.w3.org/TR/WD-html40-970708/htmlweb.html#h-4.1.1
Apart from that request parameters are encoded as well, for example:
http://www.site.com/path?hint=one&delay=two
becomes
Attachments
Issue Links
- causes
-
HSTTWO-2502 ArrayIndexOutOfBoundsException in HstContainerURLProviderImpl when html contains a link like '/site/#'.
- Closed