mirror of
https://github.com/moparisthebest/mail
synced 2024-12-21 23:08:50 -05:00
Fix regex for creating anchors from urls in reader
This commit is contained in:
parent
10cd2795f3
commit
59dc2008a4
@ -156,7 +156,7 @@ function renderNodes(root) {
|
||||
var lines = node.split('\n');
|
||||
for (i = 0; i < lines.length; i++) {
|
||||
// replace all urls with anchors
|
||||
lines[i] = lines[i].replace(/(https?:\/\/[^\s]+)/g, createArchor);
|
||||
lines[i] = lines[i].replace(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g, createArchor);
|
||||
// wrap line into an element for easier styling
|
||||
html += '<div class="line';
|
||||
if (isLineEmpty(lines[i])) {
|
||||
|
Loading…
Reference in New Issue
Block a user