jdpage / w.pl

A small wiki
0 stars 1 forks source link

Links with Spaces Around Pipe Aren't Properly Processed #52

Open woodrowbarlow opened 8 years ago

woodrowbarlow commented 8 years ago

if i created a link like [[PatternRecognition | Pattern Recognition]] (as opposed to [[PaternRecognition|Pattern Recognition]], note the spaces around the pipe), then it gets processed wrong. it renders as an external link rather than internal, and it doesn't convert the name-type link to a numeric-type permalink.

is it valid to put spaces around the pipes? if not, it should just spit out the raw, invalid link junk. if so, it should be processed when appropriate.

jdpage commented 8 years ago

Hmm. It's not invalid as such. It's just parsing the URL as PatternRecognition with a space at the end, and then deciding that that is not a real wiki page title, and so marking it as an external link and probably generating a bogus link in the process.

It should probably strip spaces off of both arguments.

jdpage commented 8 years ago

I'll try and catch this during the renderer rewrite I'm doing for #2.