|
@@ -1596,9 +1596,10 @@ class BootstrapTable {
|
|
|
|
|
|
|
|
if (isHTML) {
|
|
if (isHTML) {
|
|
|
// value can contains a HTML tags
|
|
// value can contains a HTML tags
|
|
|
- const textContent = new DOMParser().parseFromString(value.toString(), 'text/html').documentElement.textContent
|
|
|
|
|
|
|
+ let textContent = new DOMParser().parseFromString(value.toString(), 'text/html').documentElement.textContent
|
|
|
const textReplaced = textContent.replace(regExp, marker)
|
|
const textReplaced = textContent.replace(regExp, marker)
|
|
|
|
|
|
|
|
|
|
+ textContent = textContent.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
|
defValue = value.replace(new RegExp(`(>\\s*)(${textContent})(\\s*)`, 'gm'), `$1${textReplaced}$3`)
|
|
defValue = value.replace(new RegExp(`(>\\s*)(${textContent})(\\s*)`, 'gm'), `$1${textReplaced}$3`)
|
|
|
} else {
|
|
} else {
|
|
|
// but usually not
|
|
// but usually not
|