IE9和TEXTAREA换行符 [英] IE9 and TEXTAREA newlines
问题描述
我们在TEXTAREA中显示一段签名的XML.签名考虑了空格,因此保持空白至关重要.
We display a piece of signed XML in a TEXTAREA. The signing takes into account the whitespace, so it is critical that this is maintained.
然后,用户将其复制并粘贴到可验证XML的应用程序中……到目前为止,我们还没有遇到任何问题……IE9呈现的文本略有不同.
The user then copies and pastes this into an application that validates the XML... we've not had a problem with this until now... IE9 is rending the text slightly differently.
当我将其复制到HEX编辑器中时,我可以看到IE9正在将换行符渲染为0xA ...将其置于兼容模式(或使用IE6、7、8,Chrome,Firefox等),并且将其渲染为0xD,0xA
When I copy it into a HEX editor, I can see that IE9 is rendering newlines as 0xA... put it into compatibility mode (or use IE6,7,8, Chrome, Firefox etc.) and it gets rendered as 0xD,0xA
我想这不会影响大多数人,因为它看起来不错 ...但是对我们来说,这是皇家的皮塔饼!
I guess this won't effect most people, as it looks ok... but for us it is a royal PITA!!!
任何人都可能遇到此问题,最好进行修复:)
Anyone come across this, and better have a fix :)
谢谢!
推荐答案
不确定这是否真的可以解决(我确实想知道这是否是IE9中的错误吗?)
Not sure if this is really a fix (and I do wonder if this is a bug in IE9?)
无论如何,我最终将有关页面的IE9设置为IE7仿真模式:
Anyhow, I ended up putting IE9 into IE7 emulation mode for the page in question:
http://msdn.microsoft.com /en-us/library/cc288325(v=vs.85).aspx
<!-- Mimic Internet Explorer 7 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
它可以工作,但是现在,我当然没有此页面上的IE9功能.
It works, but now, of course I don't have the IE9 features on this page.
这篇关于IE9和TEXTAREA换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!