Skip to content
Snippets Groups Projects
Commit b7e02cec authored by Jared Hancock's avatar Jared Hancock
Browse files

Avoid double-encoding canned responses on upgrade

parent a70018e6
Branches
Tags
No related merge requests found
...@@ -47,89 +47,89 @@ CREATE TABLE `%TABLE_PREFIX%draft` ( ...@@ -47,89 +47,89 @@ CREATE TABLE `%TABLE_PREFIX%draft` (
UPDATE `%TABLE_PREFIX%email_template` UPDATE `%TABLE_PREFIX%email_template`
SET `body` = REPLACE( REPLACE( REPLACE( REPLACE( SET `body` = REPLACE( REPLACE( REPLACE( REPLACE(
`body`, `body`,
'&', '&'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>');
'&', '&amp;');
-- Migrate notes to HTML -- Migrate notes to HTML
UPDATE `%TABLE_PREFIX%api_key` UPDATE `%TABLE_PREFIX%api_key`
SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE( SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE(
`notes`, `notes`,
'&', '&amp;'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>');
'&', '&amp;');
UPDATE `%TABLE_PREFIX%email` UPDATE `%TABLE_PREFIX%email`
SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE( SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE(
`notes`, `notes`,
'&', '&amp;'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>');
'&', '&amp;');
UPDATE `%TABLE_PREFIX%email_template_group` UPDATE `%TABLE_PREFIX%email_template_group`
SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE( SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE(
`notes`, `notes`,
'&', '&amp;'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>');
'&', '&amp;');
UPDATE `%TABLE_PREFIX%faq` UPDATE `%TABLE_PREFIX%faq`
SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE( SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE(
`notes`, `notes`,
'&', '&amp;'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>');
'&', '&amp;');
UPDATE `%TABLE_PREFIX%faq_category` UPDATE `%TABLE_PREFIX%faq_category`
SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE( SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE(
`notes`, `notes`,
'&', '&amp;'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>');
'&', '&amp;');
UPDATE `%TABLE_PREFIX%filter` UPDATE `%TABLE_PREFIX%filter`
SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE( SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE(
`notes`, `notes`,
'&', '&amp;'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>');
'&', '&amp;');
UPDATE `%TABLE_PREFIX%groups` UPDATE `%TABLE_PREFIX%groups`
SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE( SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE(
`notes`, `notes`,
'&', '&amp;'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>');
'&', '&amp;');
UPDATE `%TABLE_PREFIX%help_topic` UPDATE `%TABLE_PREFIX%help_topic`
SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE( SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE(
`notes`, `notes`,
'&', '&amp;'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>');
'&', '&amp;');
UPDATE `%TABLE_PREFIX%page` UPDATE `%TABLE_PREFIX%page`
SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE( SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE(
`notes`, `notes`,
'&', '&amp;'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>');
'&', '&amp;');
UPDATE `%TABLE_PREFIX%sla` UPDATE `%TABLE_PREFIX%sla`
SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE( SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE(
`notes`, `notes`,
'&', '&amp;'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>');
'&', '&amp;');
UPDATE `%TABLE_PREFIX%staff` UPDATE `%TABLE_PREFIX%staff`
SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE( SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE(
`notes`, `notes`,
'&', '&amp;'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>');
'&', '&amp;');
UPDATE `%TABLE_PREFIX%team` UPDATE `%TABLE_PREFIX%team`
SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE( SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE(
`notes`, `notes`,
...@@ -142,16 +142,16 @@ UPDATE `%TABLE_PREFIX%team` ...@@ -142,16 +142,16 @@ UPDATE `%TABLE_PREFIX%team`
UPDATE `%TABLE_PREFIX%canned_response` UPDATE `%TABLE_PREFIX%canned_response`
SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE( SET `notes` = REPLACE( REPLACE( REPLACE( REPLACE(
`notes`, `notes`,
'&', '&amp;'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>'),
'&', '&amp;'),
`response` = REPLACE( REPLACE( REPLACE( REPLACE( `response` = REPLACE( REPLACE( REPLACE( REPLACE(
`response`, `response`,
'&', '&amp;'),
'<', '&lt;'), '<', '&lt;'),
'>', '&gt;'), '>', '&gt;'),
'\n', '<br/>'), '\n', '<br/>');
'&', '&amp;');
-- Migrate ticket-thread to HTML -- Migrate ticket-thread to HTML
-- XXX: Migrate & -> &amp; ? -- the problem is that there's a fix in 1.7.1 -- XXX: Migrate & -> &amp; ? -- the problem is that there's a fix in 1.7.1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment