Commit Graph

4 Commits

Author SHA1 Message Date
Florian Müllner
252e694979 util: Handle trailing LTR/RTL markers in URLs
Some electron apps apparently spread those generously over their
notification text, so may sure to not include them accidentally
in URLs.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1614
2019-09-16 20:41:47 +00:00
Florian Müllner
5cc42b18b0 utils: Simplify URL regex to only support one layer of parentheses
The author of the original URL-matching regex warns[0] that the pattern may
cause certain regex engines to lock up with certain input, namely patterns
that contain parentheses. It turns out SpiderMonkey is affected, but rather
than switching to the author's improved version (that is still crazy), sim-
plify the pattern a bit by removing support for nested parentheses in URLs.
Even a single pair of parentheses is extremely rare, so this is unlikely to
make a noticeable difference (other than not locking up SpiderMonkey of
course) ...

[0] http://daringfireball.net/2010/07/improved_regex_for_matching_urls
2018-04-13 18:15:44 +00:00
Dan Winship
75b824d032 *.js: Make emacs modelines consistent
js2-mode is no longer developed and we recommend js-mode these days,
so switch the modelines to specify that, and make them consistent
across all files.

https://bugzilla.gnome.org/show_bug.cgi?id=660358
2011-10-11 08:05:12 -04:00
Dan Winship
6496205081 tests: add a unit test for Misc.findUrls()
https://bugzilla.gnome.org/show_bug.cgi?id=636252
2011-09-08 09:09:12 -04:00