The BOM of unicode file in Freemarker's directive "include" made me crazy

作者在使用FreeMarker的include指令将navigation.html文件引入到web项目中时,遇到Microsoft Internet Explorer浏览器显示额外换行的问题,该问题在Mozilla Firefox中不存在。通过去除navigation.html文件的BOM(字节顺序标记),成功解决了IE中的显示问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Just now, I was adding a navigation to our "jstore for moliyo" web project using a derective "include" as this:
...
<body style="margin:0px;padding:0px;">
<#include "navigation.html">
...
</body>
...

the file "navigation.html" is a unicode file with a BOM:
<table><tr><td>some other words.</td></tr></table>

but a line break was displayed in Microsoft Internet Explorer, but not in Mozilla Firefox.

I'd tried hard to delete the line break, but failed.

I was crazying...

But when I saved the file "navigation.html" with no BOM, the line break was fucked off in IE.

I thought this is a bug of freemarker and I'd reportted it in the sf.net.

I'd downloaded its source from the CVS repository and attempted to find the bugged code, but nothing I found.

Well, I should go back for bed, I'm sneezing as I've caught a cold last weekeed.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值