输入格式(filters)的换行转换器

在drupal 5.x和drupal 6.x 简体中文包都将 filters 翻译为:输入格式

在默认安装后,会有Filtered HTML和Full HTML,drupal 6.x 中PHP code输入格式,需要启用该模块。

无论是 Filtered HTML 输入格式 还是 Full HTML 输入格,都会将 换行转换器 启用

换行转换器在日常的网站内容发布中的确很方便,可以自动段落、换行加上 br、p标签,然而当我们想在内容中加上其他HTML标签时,换行转换器就显得“自作聪明”

<fieldset class="style1">
<legend>标题</legend>
<div class="style2">
内容
</div>
</fieldset>

就会被替换为:

<p><fieldset class="style1"><br />
<legend>标题</legend></p>
<div class="style2">
内容
</div>
<p></fieldset></p>

在这个问题上我的临时解决方法是新建一个输入格式,把换行转换器禁用,编辑这类文章时选用这个输入格式。

评论

发表新评论

此内容将保密,不会被其他人看见。
  • 自动将网址与电子邮件地址转变为链接。
  • 允许HTML标签:<a> <img> <em> <del> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd> <h3> <h4> <h5> <h6>
  • 自动断行和分段。
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

更多关於格式化选项的信息

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.