Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

change unicode filter method #66

Merged
merged 5 commits into from
Feb 8, 2016
Merged

change unicode filter method #66

merged 5 commits into from
Feb 8, 2016

Conversation

WMDE-Fisch
Copy link
Contributor

addresses comments in #65
( \u200B ) will not be filtered

replaced whitespace filter according to https://github.com/wikimedia/mediawiki/blob/master/includes/title/MediaWikiTitleCodec.php#L227

@wmde-manicki
Copy link

apart from minor comments +1

@WMDE-Fisch
Copy link
Contributor Author

/me waiting for @thiemowmde s comments ;-)

* @return {string}
*/
function replaceWhiteSpace( str ) {
var re = /[ _\u00A0\u1680}\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]+/g;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the } is a mistake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d'oh thx, fixed

@thiemowmde
Copy link
Contributor

Seems this now replicates what core does. Like that. 👍

wmde-manicki pushed a commit that referenced this pull request Feb 8, 2016
change unicode filter method
@wmde-manicki wmde-manicki merged commit 78f4c10 into master Feb 8, 2016
@wmde-manicki wmde-manicki deleted the better-filter branch February 8, 2016 08:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants