mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-03-11 21:11:02 +00:00
Merge pull request #230 from dryabov/master
fix apostrophe in URLs (currently it is displayed as ')
This commit is contained in:
commit
b7876a71dc
@ -208,7 +208,7 @@ function htmlFormatMsg( msg, output, mentions ) {
|
||||
if( space != -1 ) url = tmp.substring(0,space); else url = tmp;
|
||||
if( url.length ) {
|
||||
msg = tmp.substr(String(url).length);
|
||||
url = url.replace(/&/g, '&');
|
||||
url = reverseHtmlEntities(url);
|
||||
var extLinkTemplate = $("#external-page-link-template").clone(true);
|
||||
extLinkTemplate.removeAttr("id");
|
||||
|
||||
@ -342,10 +342,10 @@ function escapeHtmlEntities(str) {
|
||||
|
||||
function reverseHtmlEntities(str) {
|
||||
return str
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, "'");
|
||||
.replace(/'/g, "'")
|
||||
.replace(/&/g, '&');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user