Browse Source

Escape apostrophe manually

Dustin Utecht 2 years ago
parent
commit
8dac31e51c
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/utils/index.js

+ 6 - 1
src/utils/index.js

@@ -407,6 +407,11 @@ export default {
     return false
   },
 
+  escapeApostrophe (value) {
+    return value.toString()
+      .replace(/'/g, ''')
+  },
+
   escapeHTML (text) {
     if (!text) {
       return text
@@ -524,7 +529,7 @@ export default {
 
         const field = columns[x].field
 
-        row[field] = $el.html().trim()
+        row[field] = this.escapeApostrophe($el.html().trim())
         // save td's id, class and data-* attributes
         row[`_${field}_id`] = $el.attr('id')
         row[`_${field}_class`] = $el.attr('class')