Skip to content

Commit

Permalink
Incomplete string escaping or encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Jul 27, 2024
1 parent 7cfbdd2 commit b479b70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ const Util = {
return str;
},
'tex': () => {
const texStr = str.replace('%', '\\\\%');
const texStr = str.replace(/%/g, '\\\\%');
if (status === 'low') {
return `$\\color{red}{\\textsf{${texStr}}}$`;
}
Expand Down

0 comments on commit b479b70

Please sign in to comment.