Forum

Thread tagged as: Problem, Blog

Pipe Symbol in Blog Title

I've noticed some of my clients have a tendency to use a pipe symbol (this: | ) in their blog titles. Perch is encoding this as %7C for the URL/slug, which is breaking .htaccess clean URLs and causing a 500 error. After some Googling, I can't find a good way to make .htaccess handle this, and it seems the best solution would be for Perch to strip those characters from the slug entirely, which is what Wordpress does. Is this currently possible?

Shane Lenzen

Shane Lenzen 18 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That's interesting - do you know what they're using the pipe for?

They like to use them as a pretty divider for the title. Here's one of my clients in action. The AJAX load works on titles with a pipe in them, like in the top right blog, "Featured | The Knot Magazine". But if you try to open that blog in a new tab, you'll get a 500. That's also what Google is indexing, so that's bad!

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's almost like they're using it as a form of categorisation. I wonder if having a dedicated field for that might help?

Obviously we'll look at the pipe issue, but the behaviour behind it is almost more interesting.

I think it might be that they just think it looks cool, since they aren't using the same format on every post, and they also have the ability to categorize.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Interesting. Anyway, should be addressed in the next core update.

Thanks Drew!