a509e3389d
Uses pushState / popState to keep browser history correct and allow using back in the browser.
8 lines
238 B
JavaScript
8 lines
238 B
JavaScript
function htmlEscape(str) {
|
|
return String(str)
|
|
.replace(/&/g, '&')
|
|
.replace(/"/g, '"')
|
|
.replace(/'/g, ''')
|
|
.replace(/</g, '<')
|
|
.replace(/>/g, '>');
|
|
} |