mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-05-02 14:36:08 -04:00
added test for urls2links function, fixing bug - asterisk is allowed in URLs query string
This commit is contained in:
parent
b992bcc732
commit
b00bcd1352
4 changed files with 62 additions and 4 deletions
|
@ -164,13 +164,13 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
|
|||
var markup = '<a href="$1" rel="nofollow">$1</a>';
|
||||
element.html(
|
||||
element.html().replace(
|
||||
/((http|https|ftp):\/\/[\w?=&.\/-;#@~%+-]+(?![\w\s?&.\/;#~%"=-]*>))/ig,
|
||||
/((http|https|ftp):\/\/[\w?=&.\/-;#@~%+*-]+(?![\w\s?&.\/;#~%"=-]*>))/ig,
|
||||
markup
|
||||
)
|
||||
);
|
||||
element.html(
|
||||
element.html().replace(
|
||||
/((magnet):[\w?=&.\/-;#@~%+-]+)/ig,
|
||||
/((magnet):[\w?=&.\/-;#@~%+*-]+)/ig,
|
||||
markup
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue