title: how to replace &amp;#8364; into &#8364; with javascript?
body: <p>i'm trying to fix this forum where html entities are not displayed correctly.
  since the owner is m.i.a. i'm trying to do this with an extension.</p>
  <p>what i see on my screen:</p>
  <pre><code>euro:&amp;#8364;
  pound:&amp;#163; 
  </code></pre>
  <p>view of the html DOM with firebug</p>
  <p><img src="https://i.stack.imgur.com/baXhn.png" alt="bit of html-dom as seen with firebug" /></p>
  <p>my code:</p>
  <pre><code>GM_log('before text= '+text); 
  text.replace( /amp;/gi, function( $0 ) {
      GM_log('$0= '+$0);
      fix=&quot;&quot;;
      return fix; 
  });
  GM_log(' after text= '+text); 
  </code></pre>
  <p>which returns:</p>
  <pre><code> before text= euro: &amp;amp;#8364; &lt;br&gt;pound: &amp;amp;#163;
   $0= amp;
   $0= amp;
   after text= euro: &amp;amp;#8364; &lt;br&gt;pound: &amp;amp;#163;
  </code></pre>
  <p>so my code seems to be working until the point it has to replace.</p>
  <p>are those rectangles preventing it? did i do something wrong?</p>
  <p>and if so how can i fix this?</p>
  <p>thanks.</p>