Escaping the hash symbol in a URL

Splash Forums PrettyFaces Users Escaping the hash symbol in a URL

This topic contains 2 replies, has 3 voices, and was last updated by  Lincoln Baxter III 7 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #26522



    I have added the following snippet in the pretty-cms-config.xml file I have deployed:
    Because I want the page to open on a specific tab.

    <url-mapping id=”/vanity-test”>

    But I’m not sure how to escape the hash tag. It does not look like escaping it with %23 does any good. Currently, the vanity URL is not being created at all, and it’s due to the hash tag. Once I remove the “#tab-2”, the vanity URL takes effect. Is there a different way of encoding the hash tag?


    This isn’t possible. Something like “#tab1” is only used by the browser to navigate to a specific part of the page AFTER the full page has been loaded. But “#tab1” isn’t part of the request sent to the server. Therefore you cannot use it for a view-id and cannot “hide” it using PrettyFaces.


    I think he wants to have PrettyFaces generate an outbound link that adds the anchor. Afaik, the best way to do this is to issue a redirect yourself:

    Assuming your mapping is this:

    <url-mapping id=”/vanity-test”>


    And PrettyFaces should issue a new URL:



Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.