View Single Post
Old 03-30-2024, 06:51 PM   #430
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,757
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kiwidude View Post
Hi @chaley - perhaps I am missing something but the second example is exactly the situation unicornula has where they dont want the token encoded vs the current plugin behaviour where all tokens are encoded? It is a strange edge case…
I wasn't clear. I was trying to demonstrate why encoding templates in the path could lead to problems. If only query strings are encoded then the second case won't occur because the template in the path portion of the URL is not encoded.

I don't recall ever seeing encoding anywhere but the query string, but I certainly can't say that it doesn't/shouldn't happen.

I have considered adding a url_encode() template function so the user can make the choice. Unfortunately this would work only if the user can guarantee that no further encoding will take place. Double encoding a URL won't work at all. I hesitate to add a function that can lead to this sort of problem.
chaley is offline   Reply With Quote