上传后服务器编辑的Html页面?
这是这篇文章的延续:是什么让 Internet Explorer 进入怪癖模式? .
我有一个基于 Django LFC CMS 构建的网页 ( http://snow4life.pl/ ).问题是,当我将文件上传到服务器时,默认模板(http://bitbucket.org/diefenbach/lfc-theme-1.0/src/tip/lfc_theme/templates/lfc/base.html)以某种方式由服务器编辑,并在 DOCTYPE 声明之前添加一些随机空格。声明本身被移动到 段中的某个位置。这当然会让 Internet Explorer 进入怪癖模式。这不是模板错误,因为在演示页面上它工作正常( http://demo .django-lfc.com/)。您有什么想法会导致这种情况吗?我尝试上传空的 html 页面、w3c 的示例、以十六进制模式编辑它,但没有任何效果。
编辑
我正在通过 WinSCP 上传。以下是服务器上 vi、服务器上的 winscp 编辑器、本地磁盘上的 vim 和本地 vi(hex) 中编辑的屏幕截图。
It's a continuation of this post : What throws Internet Explorer into quirks mode? .
I have a webpage, built on Django LFC CMS ( http://snow4life.pl/ ). Problem is that when I upload my files to server, the default templates (http://bitbucket.org/diefenbach/lfc-theme-1.0/src/tip/lfc_theme/templates/lfc/base.html) are somehow edited by the server and some random whitespaces are added before the DOCTYPE declaration. The declaration itself is moved somewhere in the <body>
segment. This of course throws internet explorer into quirks mode. This is not the templates fault, as on the demo page it is working normally ( http://demo.django-lfc.com/). Do you have any ideas what can cause this ? I've tried uploading empty html pages, samples from w3c, editing it in hex mode and nothing works.
EDIT
I'm uploading via WinSCP. Here are the screenshots from edits in vi on server, winscp's editor on server, vim on my local disk and vi(hex) locally.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您始终可以强制 ie 以标准模式运行:
You can always force ie to run in standards mode :
<meta http-equiv="X-UA-Compatible" content="IE=8" />