Browse Source

Add more escaping char in the good order to avoid breaking XML quote for Databases

master
LecygneNoir 5 years ago
parent
commit
4c834e4385
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      rollback_database.sh

+ 6
- 2
rollback_database.sh View File

@ -51,11 +51,15 @@ for key in $(grep Key ${ORIGINAL_XML} | awk -F'"' '{print $2}'); do
# Escape special char causing problem in with sed and xml # Escape special char causing problem in with sed and xml
msgstr=${msgstr//'\n'/'\\n'} msgstr=${msgstr//'\n'/'\\n'}
msgstr=${msgstr//'&'/'&'}
msgstr=${msgstr//' & '/' & '}
msgstr=${msgstr//'\"'/"""} msgstr=${msgstr//'\"'/"""}
msgstr=${msgstr//'&'/'\&'}
msgid=${msgid//'\n'/'\\n'} msgid=${msgid//'\n'/'\\n'}
msgid=${msgid//'&'/'&'}
msgid=${msgid//' & '/' & '}
msgid=${msgid//'\"'/"""} msgid=${msgid//'\"'/"""}
msgid=${msgid//'&'/'\&'}
if [[ "${msgstr}" == "" ]]; then if [[ "${msgstr}" == "" ]]; then

Loading…
Cancel
Save