-- Fix HTML entities in link preview titles
UPDATE posts SET link_preview_title = REPLACE(link_preview_title, '&#039;', '''') WHERE link_preview_title LIKE '%&#039;%';
UPDATE posts SET link_preview_title = REPLACE(link_preview_title, '&amp;', '&') WHERE link_preview_title LIKE '%&amp;%';
UPDATE posts SET link_preview_title = REPLACE(link_preview_title, '&quot;', '"') WHERE link_preview_title LIKE '%&quot;%';

-- Fix HTML entities in link preview descriptions
UPDATE posts SET link_preview_description = REPLACE(link_preview_description, '&#039;', '''') WHERE link_preview_description LIKE '%&#039;%';
UPDATE posts SET link_preview_description = REPLACE(link_preview_description, '&amp;', '&') WHERE link_preview_description LIKE '%&amp;%';
UPDATE posts SET link_preview_description = REPLACE(link_preview_description, '&quot;', '"') WHERE link_preview_description LIKE '%&quot;%';

-- Fix HTML entities in article titles/descriptions
UPDATE official_account_articles SET title = REPLACE(title, '&#039;', '''') WHERE title LIKE '%&#039;%';
UPDATE official_account_articles SET title = REPLACE(title, '&amp;', '&') WHERE title LIKE '%&amp;%';
UPDATE official_account_articles SET description = REPLACE(description, '&#039;', '''') WHERE description LIKE '%&#039;%';
UPDATE official_account_articles SET description = REPLACE(description, '&amp;', '&') WHERE description LIKE '%&amp;%';
