We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44231
    • 126 Posts
    hi there!

    how do remove the percent sign in my url address?

    Scenario:

    I have a searchbox when the user enter for example 'sample 15%' the button will pass a parameter 'keyword'
    to the address bar making the url like this www.sampleWebsite.com/searchword.php&keyword=sample%2015% and it will redirect me into a error page Bad request Erroe 400

    what should I do? thanks!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You need to use URL encoding (%xx) for characters like that.
      sample%2015%25

      %20 is for space, %25 is for the % sign.

      http://www.blooberry.com/indexdot/html/topics/urlencoding.htm

      There is a plugin for this, but I can't find it at the moment.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 44231
        • 126 Posts
        thanks for the reply

        what is the name of the plugin?
          • 44231
          • 126 Posts
          Quote from: johnrobert27 at Aug 02, 2013, 02:56 AM
          thanks for the reply

          what is the name of the plugin?

          how do i do that? should I put it in the input box?
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Personally, I would just re-code the link generating snippet to produce a safe string to use in the URL.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 44231
              • 126 Posts
              hmm the search is trigger by a button which runs in js the the js will get the value of the input search box where the keyword is the the js will pass it to the url..
              how do I change this I think re-code will fall in my input search box