Postgres update with replace
If the SELECT works as expected, so should your UPDATE. More: it should update all columns, which is most probably not what you want.

UPDATE test
SET    field_1 = replace(field_1, $$&lt;div class="ad-content"&gt;&lt;div class="ad-title"&gt;publicidade&lt;/div&gt;&lt;div id='div-gpt-ad-1426519214388-1'&gt; &lt;script type='text/javascript'&gt;googletag.cmd.push(function(){googletag.display('div-gpt-ad-1426519214388-1');});&lt;/script&gt; &lt;/div&gt;&lt;/div&gt;$$, '')
WHERE  field_1              LIKE $$%&lt;div class="ad-content"&gt;&lt;div class="ad-title"&gt;publicidade&lt;/div&gt;&lt;div id='div-gpt-ad-1426519214388-1'&gt; &lt;script type='text/javascript'&gt;googletag.cmd.push(function(){googletag.display('div-gpt-ad-1426519214388-1');});&lt;/script&gt; &lt;/div&gt;&lt;/div&gt;%$$


I added a WHERE clause to avoid expensive and pointless empty updates.

Related:


Insert text with single quotes in PostgreSQL
How do I (or can I) SELECT DISTINCT on multiple columns?