Reputation: 15018
I'm trying to use a component called Codemirror for in-browser source code editing. It works great, but IE7 has a bug (feature?) that autolinks all email addresses that are typed into the code editing window.
For example, if I type String x = "[email protected]";
, IE turns this into String x = [email protected];
-- it strips the quotes and underlines it.
Does anyone know how to override or disable this? Thank you.
-tjw
Upvotes: 2
Views: 633
Reputation: 1223
I have heard about Codemirror, but I did not used it yet, have you tried:
· Changing the @ for @
?
· Adding a part of the string to the other?
· Parsing the final result to String again?
Upvotes: 1
Reputation: 57095
I presume the component is using a Web Browser Control under the covers, which seems like an odd choice. You can prevent automatic hyperlink generation using ExecCommand(IDM_AUTOURLDETECT_MODE); see http://msdn.microsoft.com/en-us/library/aa769893(v=vs.85).aspx
Prior to IE9, it was not possible to specify IDM_AUTOURLDETECT_MODE from JavaScript, meaning that pages could not disable automatic hyperlinking in ContentEditable areas. A new command constant AutoUrlDetect is supported in IE9, allowing script to disable automatic hyperlinking as follows: document.execCommand("AutoUrlDetect", false, false)
Upvotes: 1
Reputation:
Using single quotes instead of double should work. I've tested it in IE8 and IE9 RC1.
Upvotes: 1