Wikia/app — pull request #288 by relwell (2013-01-03 18:00:35+00:00)
Title: Bugid 68713

This issue addresses a problem with external services, where our URLs do not follow the guidelines of percent-encoding RFC 3986 reserved characters.

For example, if you attempt to use a share button on a page where the URL is something like, "Wanted!", Twitter will not recognize the exclamation point when creating the URL.

The first step of fixing this problem is to update share buttons to URL-encode those reserved characters. This is a change to the ShareButton abstract class.

The second step of fixing this problem is to register a hook in the SEOTweaksHelper that, for a title that does not exist, checks the page table for regular expression matches that include any punctuation after the provided title. *I have tested this on LyricWiki on dev, and it seems to work pretty well.* However, I'd like some review and signoff from @owend, @moliwikia, or @psychonaut to make sure this kind of feature wouldn't know over the site. Some of my thoughts for mitigating this include checking the referrer, or simply disabling this feature on sufficiently large wikis.

This pull request also addresses a defect where we were not providing the appropriate URL for share buttons. All share buttons were linking to the main page of a wiki instead of the article for the page you were on. So if this pull request is reject, there are still a few commits we'll have to cherry-pick over :)