Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

slashes are replaced with %2F when sharing urls in facebook

Hi all,

When we post a url in Facebook (http://www.example.com/Articles/index.php?p=/categories/movies) the slashes are replaced with %2F. What I guess is that this is not a Vanilla Issue. But the url structure (using ?p etc) may be causing this trouble. (I guessed because when I posted a url as I gave above, with example.com, the slashes still replaces).

Do you guys have any idea. Or do you face the same issue(Who don't use rewrite urls). Btw I cannot use url rewrite as I have a windows server hosting.

And really sorry for posting this question in this forum. But I hope someone could help me. Thanx in advance.

Comments

  • Options
    hgtonighthgtonight ∞ · New MVP

    When a url is encoded, the slash symbol / is replaced with %2F.

    This shouldn't cause any problems.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options

    Thnx @hgtonight, But can't we avoid it, as the urls are not nice (Although technically there may not be any problem).And do you guys too face this issue? I mean isn't there a solution?

  • Options
    hgtonighthgtonight ∞ · New MVP

    This isn't something that could be controlled on Vanilla's end. Is this an issue with the Share addon? Or does this just happen when you post a url to facebook?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options

    @hgtonight it happens whenever i post a url to facebook.(I guess index.php? kind of urling has something to do with it). and does not happen when i posted http://vanillaforums.org/discussion/comment/181581#Comment_18158 . So i guess "index.php?p=" is the reason.
    Should somehow implement pretty URLs, i guess. :(
    And thnx once again.

  • Options
    hgtonighthgtonight ∞ · New MVP

    I misunderstood your question initially.

    The slashes after index.php?p= are encoded since Facebook recognizes them as a parameter. Since it is best practice to sanitize parameter inputs using url encoding, the slashes get replaced.

    When 'pretty' urls are used, Facebook thinks it is just a 'regular' url where slashes matter and therefore do not encode them.

    This will be the expected behavior for any website that sanitizes links.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options

    @hgtonight So only way for me to get this resolved is to have pretty URLs?
    Thnx for the insights.

Sign In or Register to comment.