Forum:Problem with PAGENAME test on one page

I have a template wich i recently modified so the text of some link would change to something else when it was the same of the PAGENAME. It work perfect on most pages that use that template. Except one page and i dont understand why.

Template : http://fr.guildwars.wikia.com/wiki/Mod%C3%A8le:Miniature_armure

Page with problem : http://fr.guildwars.wikia.com/wiki/Armure_d%27Asura

Example pages where there's no problem :
 * http://fr.guildwars.wikia.com/wiki/Armure_d%27obsidienne
 * http://fr.guildwars.wikia.com/wiki/Armure_de_Shing_Jea
 * http://fr.guildwars.wikia.com/wiki/Armure_de_Luxon

I'm using #ifeq: to test if the page name is the same as the parameter :

And only on the page "Armure d'Asura" there is a problem.

Thanks for any help. — TulipVorlax 13:38, February 22, 2010 (UTC)


 * on the problem page yields  which is not the same as   (the armure parameter). The first working example in your list has it done correctly. Hope this helps. - Adan Aileron (talk) 18:00, February 22, 2010 (UTC)


 * Ok, what i've first done on thoses pages is pasting and it was not working with the &amp;#39; in them, at first. Maybe there was a bit of delay with the cache and i made some other edits too soon.
 * Find it weird though that the magic word give &amp;#39; as if people should know to use that instead of copy~pasting the page name at the top of the page. — TulipVorlax 21:20, February 22, 2010 (UTC)

returns a "ready to print" html safe string, this means all the fun chars like ' are encoded to. If you are comparing anything against it using ifeq, you need to  it first. so in your above example

--Uberfuzzy 15:46, February 23, 2010 (UTC)


 * Really?
 * give
 * on a page named "Armure d'Asura" give Armure d&amp;#39;Asura
 * Is really equivalent to Armure d&amp;#39;Asura ?
 * We can test it using :
 * << look in code to see &amp;#39;
 * Result :
 * But even so, it was the other way around.
 * had been used on every one of thoses pages to get the value for.
 * The template was asking if the current page name was equal to the value of the parameter.
 * When the value contain &amp;#39, it work. But before knowing it was working that way, i had removed them all on the test page and replace them with the normal apostrophe.
 * Still, that caracter encode to %27 in URLs, not &amp;#39. — TulipVorlax 07:20, February 24, 2010 (UTC)

OK ! I got it !

Must use the page name magic work with two E at the end to get %27 instead of &amp;#39;. — TulipVorlax 07:28, February 24, 2010 (UTC)