整齐转换 至<类别 =“c1”>

发布于 2024-07-04 13:15:47 字数 167 浏览 6 评论 0原文

我正在使用 PHP 5 Tidy 类来格式化 html。

一切都很好,除了当它传递样式属性、将其更改为类属性时。 由于我只格式化文档的正文,而不是头部,因此头部中没有定义用于读取属性的类。

我已经查看了所有 Tidy 选项,但不知道如何阻止这种行为。

谢谢

I am using the PHP 5 Tidy class to format html.

Everything is fine except when it gets passed a style attribute, when it changes it into a class attribute. As I am only formatting the body of a document, not the head, there is no class defined in the head for the attribute to read.

I have looked through all the Tidy options but can't work out how to stop this behaviour.

Thanks

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

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

发布评论

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

评论(1

甜点 2024-07-11 13:15:47

尝试关闭 clean 选项。

Try switching the clean option off.

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