Manual talk:Urlencoding

Encoded parameter behaving erracticaly in CSS properties

edit

I am having a crazy issue with {{urlencode:...}} inside CSS property values, here's how you can replicate it:

Create a Sandbox template with the following code:

<span class="{{{1|}}}">classy</span>

<span id="{{{1|}}}">ideal</span>

Call it somewhere else with something like this:

{{Sandbox|{{urlencode: Not an encoded string / no way! }}}}

This is how the result is presented:

<p><span class="Not+an+encoded+string+%2F+no+way%21">classy</span></p>
<p><span id="Not.2Ban.2Bencoded.2Bstring.2B.252F.2Bno.2Bway.2521">ideal</span></p>

Notice the content of the class and id CSS parameters do not match, eventhough they both should be transcluding the contents of the first parameter {{{1|}}}, which should be, in my understanding constant inside the template.

What is going on? Any clues?

Thanks in advance Rbirmann (talk) 00:32, 13 December 2024 (UTC)Reply

Return to "Urlencoding" page.