上传后服务器编辑的Html页面?

发布于 2024-09-28 12:10:18 字数 1033 浏览 1 评论 0原文

这是这篇文章的延续:是什么让 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.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

樱花坊 2024-10-05 12:10:18

您始终可以强制 ie 以标准模式运行:

You can always force ie to run in standards mode :

<meta http-equiv="X-UA-Compatible" content="IE=8" />

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文