diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index 7a84566..de0ca85 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -326,7 +326,7 @@ function insertTextAtCursor(textArea, result, tagword) { sanitizedText = CFG.replaceUnderscores ? text.replaceAll("_", " ") : text; } - if (CFG.escapeParentheses) { + if (CFG.escapeParentheses && tagType === ResultType.tag) { sanitizedText = sanitizedText .replaceAll("(", "\\(") .replaceAll(")", "\\)")