Thread:Extension talk:ParserFunctions/ ifexist problem

I'm creating a template to redirect red links to wikipedia, here's the content of the template : theorically if exists output, if doesn't exist output , function seems right isn't it?

practically, it works with one word, for instance it works with, w being the name of the template but when it comes with spaced words such as, output is Page Test Page and link is Test

why is spacing causing issues? I don't get it, if anyone can help me, thanks.