darcyclarke / Repo.js

:page_facing_up: A plugin to embed Github repos on your site
MIT License
911 stars 82 forks source link

Escaping dots in data-id pattern #27

Closed gregooverse closed 11 years ago

gregooverse commented 11 years ago

If the repo has a name with dots, it causes a jQuery syntax error. The RegEx pattern was a bit weird, deleting everything that is not alphanumeric if it is followed by a dash and an underscore. That pretty much matches nothing. I think the underscore and the dash were meant to be inside the RegEx class so that everything that isn't alphanumeric, a dash or an underscore has to be escaped to prevent problems in selectors using the namespace.