aaroneaton/better-yourls

Titles are submitted to YOURLS (mostly) without spaces

Closed this issue · 4 comments

dgw commented

I have a lot of CamelCase link titles in my YOURLS database now.

For example, the post title "New Version of WOT Released" becomes "NewVersionofWOTReleased" when submitted to YOURLS by this plugin.

Oddly enough, some have spaces in rare cases, e.g. "Gdrive Rumors Surface Again" becomes "GdriveRumorsSurface Again".

I want to say this is a result of using sanitize_title(), but I haven't been able to definitively trace it to anything.

I believe it's related to this function: esc_url_raw. Removing the function results in expected output.

The function appears to be intended for use on actual URL values, not an entire array of arguments based on the documentation. Perhaps it would be better to sanitize each array value according to the type of data?

Good point. If time permits I'll actually start getting some code on this stuff in this weekend.

dgw commented

Looks like it's solved in 3e6d2f3 / 2.0.1, but I'll hold off on closing until I publish my next post tomorrow or Monday and confirm what happens when its URL is shortened.

dgw commented

Fixed in 2.0.1, confirmed just now when I published a post. Thanks!