Skip to content

Instantly share code, notes, and snippets.

@ikks
Created August 11, 2014 13:16
Show Gist options
  • Save ikks/1f9b39d56c6cca86a0a4 to your computer and use it in GitHub Desktop.
Save ikks/1f9b39d56c6cca86a0a4 to your computer and use it in GitHub Desktop.
Update html entities to raw in postgresql
UPDATE cms_base_page SET content=replace(content, 'Á', 'Á');
UPDATE cms_base_page SET content=replace(content, 'É', 'É');
UPDATE cms_base_page SET content=replace(content, 'Í', 'Í');
UPDATE cms_base_page SET content=replace(content, 'Ó', 'Ó');
UPDATE cms_base_page SET content=replace(content, 'Ú', 'Ú');
UPDATE cms_base_page SET content=replace(content, 'Ü', 'Ü');
UPDATE cms_base_page SET content=replace(content, 'Ñ', 'Ñ');
UPDATE cms_base_page SET content=replace(content, 'á', 'á');
UPDATE cms_base_page SET content=replace(content, 'é', 'é');
UPDATE cms_base_page SET content=replace(content, 'í', 'í');
UPDATE cms_base_page SET content=replace(content, 'ó', 'ó');
UPDATE cms_base_page SET content=replace(content, 'ú', 'ú');
UPDATE cms_base_page SET content=replace(content, 'ü', 'ü');
UPDATE cms_base_page SET content=replace(content, 'ñ', 'ñ');
@rdemorais
Copy link

thanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment