Add global flag to a regular expression
This commit is contained in:
parent
7c25eac748
commit
5dd784e4b7
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ https.get("https://blog.svrjs.org/atom.xml", function (res) {
|
||||||
var imageURL = "https://blog.svrjs.org/images/covers/" + (qim ? qim[1] : "missing") + ".png";
|
var imageURL = "https://blog.svrjs.org/images/covers/" + (qim ? qim[1] : "missing") + ".png";
|
||||||
formatTemplate("index.html", {
|
formatTemplate("index.html", {
|
||||||
"title": antiXSS(ent[_qid].title),
|
"title": antiXSS(ent[_qid].title),
|
||||||
"summary": ent[_qid].summary.replace(/ (src|href)="\/(?!\/)/," $1=\"https://blog.svrjs.org/"),
|
"summary": ent[_qid].summary.replace(/ (src|href)="\/(?!\/)/g," $1=\"https://blog.svrjs.org/"),
|
||||||
"image": antiXSS(imageURL),
|
"image": antiXSS(imageURL),
|
||||||
"link": antiXSS(ent[_qid].id),
|
"link": antiXSS(ent[_qid].id),
|
||||||
"unsubscribe": antiXSS("https://newsletter.svrjs.org/unsubscribe.svr?id=" + encodeURIComponent(emails[_id].unsubscribeId))
|
"unsubscribe": antiXSS("https://newsletter.svrjs.org/unsubscribe.svr?id=" + encodeURIComponent(emails[_id].unsubscribeId))
|
||||||
|
|
Reference in a new issue