New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirect to url with query string does not encode the input from shortcode #11049
Comments
This is a BUG. When the URL is: mydomain.com/?name=field id=name] Does not redirect due to space between field and id. |
This issue has been resolved in Elementor Pro v2.9.3 Feel free to update Thanks! |
@shilo-ey |
here is a workaround to fix this issue https://github.com/TitoFM16/workaround-for-wp-elementor-plugin-redirection-encoding-parameters-bug |
Not fixed indeed. Anything passed into the query string is not encoded, causing the redirect to fail. |
@TitoFM16 : i've seen your workaround - where would this code go? |
@shilo-ey can you reopen please? Issue is not fixed |
@barttermorshuizen This code can go whenever you want, but is easier to create this file on the root folder of your WP installation, I don't know if urlencode() is enough to fix the URL but for sure not to redirect, instead I use html_entity_decode to fix the & or any other Html Entity to unicode & so the code works as follow: 1- You don't do the redirect to the page you want instead you do the request to the path where the code is, for example www.yourdomain.com/custom-encoder.php 2 - then in the 3- then I create the final url concatenating the url to where I want to redirect with the wrong query strings that you got on the point 2. 4- then with the html_entity_decode function I fix the final to have the correct characters and finally I redirect to the correct url with correct encoding. I just tried with the urlencode and this does not work as you expect, I think the best approach is my workaround, if you need something else, just reply for clarification. |
Description
I use a simple form with an input field and a button. The text input has a field id and in the redirect settings of the form I target a different site with a query string from this specific field id: "mydomain.de/kontakt?queryId=[field id="myId"]".
I noticed that the string from the field id is not encoded, producing urls like this: "mydomain.de/kontakt?queryId=just an example".
A guide from the Elementor page (https://docs.elementor.com/article/451-dynamic-request-parameter) shows in the gif at the bottom of the page a similar behaviour.
In my opinion, the query string should be encoded in order to use special characters etc.
Steps to reproduce
Isolating the problem
Other
If I use an unfitting way to solve my use case, I'd be happy to hear another option :)
I want a form on the landing page with user input. After the user types some words and clicks the button, he should be redirect to a form where one of the fields is filled with the users input from the landing page.
Here is my page: http://lagerbox-merzig.de/
The text was updated successfully, but these errors were encountered: