Index: /trunk/htmlarea.js
===================================================================
--- /trunk/htmlarea.js (revision 261)
+++ /trunk/htmlarea.js (revision 263)
@@ -4179,5 +4179,5 @@
   if(typeof this.config.stripSelfNamedAnchors != 'undefined' && this.config.stripSelfNamedAnchors)
   {
-    var stripRe = new RegExp(document.location.href.replace(HTMLArea.RE_Specials, '\\$1') + '(#.*)', 'g');
+    var stripRe = new RegExp(document.location.href.replace(HTMLArea.RE_Specials, '\\$1') + '(#[^\'" ]*)', 'g');
     html = html.replace(stripRe, '$1');
   }
