Markdown is manipulating my URL even though I add the &noprocess flag.
my URL [Link Here](https://sampledomain.com/?q=page/test-page-16779&noprocess)
what is being returned https://sampledomain.com/?q=page%2test-page-16779
Markdown is manipulating my URL even though I add the &noprocess flag.
my URL [Link Here](https://sampledomain.com/?q=page/test-page-16779&noprocess)
what is being returned https://sampledomain.com/?q=page%2test-page-16779
@crusnac, What result are you hoping to get?
I am hoping to get https://sampledomain.com/?q=page/test-page-16779
the / in page/test-page-16779 is being replaced with %2 see page%2test-page-16779
@crusnac, Yes, I got that…
I’m afraid my question was a bit confusing… I was hoping for some more information because I don’t know how you interpret the given url, what you are expecting and what in your mind the problem is.
?q=page%2test-page-16779, while url encoding should result in ?q=page%2Ftest-page-16779. Notice your %2 vs %2F.?q=page%2test-page-16779.?q=page is the query, and /test-page-16779 is a path to a page.?q=page/test-page-16779 is the query.?q=page%2Ftest-page-16779 will be misinterpreted by the server.&noprocess would not encode the / into %2F
?q=page%2Ftest-page-16779 to be ugly.Yes, sorry. My url is https://sampledomain.com/?q=page/test-page-16779 (cleansed for security reasons).
When I use the url above in a document [Link Here](https://sampledomain.com/?q=page/test-page-16779&noprocess), Grav manipulates it by encoding the / into %2F which makes the URL invalid.
Based upon the documentation adding a &noprocess shouldn’t encode? Is this a bug or am I missing something?
Grav manipulates it by encoding the
/into%2Fwhich makes the URL invalid
A url with a query containing %2F isn’t invalid.
Google, for example, turns a search for “invalid/url” into url https://www.google.com/search?q=invalid%2Furl...
What makes you think it is invalid? Did you get an error somewhere?
Based upon the documentation adding a
&noprocessshouldn’t encode?
I presume you’re referring to subjects Skip all attributes and Skip certain attributes from the Link attributes section.
It doesn’t say anything about url-encoding, but only that using &noprocess, all/certain attributes in the provided link will not be extracted into attributes in <a> elements. Like ?classes=underline for example.
See the code that transforms the Markdown link into an anchor element: Excerpts.php::processLinkExcerpt(). It is line 142 using PHP function http_build_query() that converts the / into %2F in the query part of the link.