HTML-如何删除零宽度无间断空格 [英] HTML - How to remove Zero-Width No Break Space
问题描述
我已经看过两者:
- Remove zero-width space characters from a JavaScript string
- Why is  appearing in my HTML?
问题:
每次.breadcrumbs
和.hero
div之间完全相同的位置(有些页面没有.actions
容器,以防您想知道).
The unicode character comes in the exact same spot every time, between the .breadcrumbs
and .hero
divs (some of the pages do not have an .actions
container in case you're wondering).
使用Sitecore 8(CMS).我不知道这是从哪里来的.它只发生在几页上,我认为我将其范围缩小到了(2)个渲染图.我按照上面(2)个博客文章之一的建议,将HTML从VS中复制到了Notepad ++中,然后将其从Notepad中重新复制回了VS中.但是,此操作不起作用,因此使我相信该Unicode某种程度上来自CMS.
Using Sitecore 8 (CMS). I have NO IDEA where this is coming from. It only happens on a couple of pages, and I think I've narrowed it down to (2) renderings. I followed the advice in one of the (2) blog posts above, and copied the HTML out of my VS, into Notepad++, and re-copied it out of Notepad back into VS. However this is not working, therefore this leads me to believe that somehow this unicode is coming from the CMS.
我的问题:
此网站即将(几天之内)即将投入生产,我需要快速修复(或者这可能是唯一的修复).
This site is about to go into production very soon (couple of days now), and I need a quick fix (or this could be the only fix).
- 最好(在时间上等)检查页面是否包含
这些(2)元素
.hero
和.breadcrumbs
,然后去除 Unicode字符? - 我要搜索文本,

还是其他? (IE -U+FEFF
等) - 我没有想到的另一种方式
- Would it be optimal (time wise, etc) to check if the page contains
these (2) elements,
.hero
and.breadcrumbs
, and then strip out the unicode character? - Do I search for the text,

or something else? (ie -U+FEFF
, etc) - Another way that I'm not thinking of
推荐答案
对于我来说,我打开了所有我认为会对Notepad ++产生影响的文件,然后在每个文件(在Notepad ++中)中,将编码更改为Encode in ANSI
.其中一个文件的顶部有一些象形文字(第1行).删除了该文件并保存回正常的编码状态.
In my case, I opened up all files that I thought were be an impact into Notepad++, then on each file (in Notepad++), I changed the encoding to Encode in ANSI
. One of the files had some hieroglyphics on top (line 1). Removed that and saved back to normal encoded state.
这篇关于HTML-如何删除零宽度无间断空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!