Hi,
we are on the version 12.10.3 and have a problem with the $repsonse.sendRedirect Function.
When we use a umlaut in a parameter it converts to a weird character.
For example:
$response.sendRedirect('/Main/playground?text=*hörsaal*')
creates an Url like this
https://example/Main/playground?text=*h%EF%BF%BDrsaal*&f_type=DOCUMENT&f_locale=en&f_locale=&r=1
When I echo the request.test this is the result: (*h�rsaal*)
When an Umlaut is used in the pagename the Umlaut is used correctly.
Is there a way to fix this for me?
Greetings
Dominic
I found a fix. I probably missed to write that $xwiki.url() is also in the equation here.
The problem was:
$xwiki.getURL('Main.Persönliche', 'view', "text=hörsaal")
created something like this.
/Main/Pers%C3%B6nliche?text=hörsaal
It converted the first argument but not a ladder one.
so i added a ${escapetool.url('hörsaal')}
.
I don’t know why getURL only converts parts of url, but for me this workaround fixes the problem.
1 Like
Cool, thanks for posting back.
"text=hörsaal"
is URL syntax already so it would not make any sense to escape it. If it did the =
too would be escaped.
that makes sense. thx for clearing that up.