mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 10:45:42 +00:00
Bug 293596 - Exclude punctuation after URLs better.
ChatZilla only. r=silver a=shaver p=glenjamin@gmail.com (Glen Mailer)
This commit is contained in:
parent
ee3f239136
commit
80dacc26b1
@ -40,8 +40,19 @@
|
|||||||
|
|
||||||
function initMunger()
|
function initMunger()
|
||||||
{
|
{
|
||||||
|
/* linkRE: the general URL linkifier regular expression:
|
||||||
|
*
|
||||||
|
* - start with whitespace, non-word, or begining-of-line
|
||||||
|
* - then match:
|
||||||
|
* - EITHER scheme (word + hyphen), colon, then lots of non-whitespace
|
||||||
|
* - OR "www" followed by at least 2 sets of:
|
||||||
|
* - "." plus some non-whitespace, non-"." characters
|
||||||
|
* - must end match with a word-break
|
||||||
|
* - include a "/" or "=" beyond break if present
|
||||||
|
* - end with whitespace, non-word, or end-of-line
|
||||||
|
*/
|
||||||
client.linkRE =
|
client.linkRE =
|
||||||
/(?:\s|\W|^)((?:(\w[\w-]+):[^\s]+|www(\.[^.\s]+){2,})[^\s>)\].,!?\'\"\u201d])(?:\s|\W|$)/;
|
/(?:\s|\W|^)((?:(\w[\w-]+):[^\s]+|www(\.[^.\s]+){2,})\b[\/=]?)(?:\s|\W|$)/;
|
||||||
|
|
||||||
var munger = client.munger = new CMunger();
|
var munger = client.munger = new CMunger();
|
||||||
// Special internal munger!
|
// Special internal munger!
|
||||||
|
Loading…
Reference in New Issue
Block a user