< o:p>元素反正吗? [英] What do <o:p> elements do anyway?
问题描述
在通过Outlook转发电子邮件后,Microsoft Office将其讨厌的标记注入某些html时遇到了一些(标准)问题.
I've been running into some (standard) issues with Microsoft Office injecting its nasty markup into some html after forwarding an email via Outlook.
我想知道:
- 是否有资源说明
实际 的作用
- 通常还会注入哪些其他MSO元素
- Is there a resource that explains what
<o:p>
elements actually do - What other MSO elements are commonly injected
推荐答案
Couldn't find any official documentation (no surprise there) but according to this interesting article, those elements are injected in order to enable Word to convert the HTML back to fully compatible Word document, with everything preserved.
相关段落:
Microsoft向Word的HTML中添加了特殊标记,以期向后兼容. Microsoft希望您能够以HTML格式保存文件,并具有传统DOC文件中发现的所有跟踪,注释,格式和其他特殊Word功能.如果您将文件保存为HTML格式,然后再将其重新加载到Word中,那么从理论上讲,您根本不会丢失任何内容.
Microsoft added the special tags to Word's HTML with an eye toward backward compatibility. Microsoft wanted you to be able to save files in HTML complete with all of the tracking, comments, formatting, and other special Word features found in traditional DOC files. If you save a file in HTML and then reload it in Word, theoretically you don't loose anything at all.
这很有道理.
对于您的特定问题.. <o:p>
中的o
表示"Office名称空间",因此标记中o:
之后的所有内容表示我是Office名称空间的一部分"-在<o:p>
的情况下它只是表示段落,相当于普通的<p>
标记.
For your specific question.. the o
in the <o:p>
means "Office namespace" so anything following the o:
in a tag means "I'm part of Office namespace" - in case of <o:p>
it just means paragraph, the equivalent of the ordinary <p>
tag.
我假设每个HTML标记都有其等同"的Office,并且还有更多.
I assume that every HTML tag has its Office "equivalent" and they have more.
这篇关于< o:p>元素反正吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!