We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ed16b3 commit 38ffc85Copy full SHA for 38ffc85
1 file changed
lib/util.js
@@ -1,14 +1,14 @@
1
'use strict';
2
3
-function encode(string) {
4
- const pairs = {
5
- '&': '&',
6
- '"': '"',
7
- '\'': ''',
8
- '<': '<',
9
- '>': '>'
10
- };
+const pairs = {
+ '&': '&',
+ '"': '"',
+ '\'': ''',
+ '<': '<',
+ '>': '>'
+};
11
+function encode(string) {
12
for (const symbol in pairs) {
13
if (typeof string !== 'undefined') {
14
string = string.replace(new RegExp(symbol, 'g'), pairs[symbol]);
0 commit comments