05122008 ~ 142804

This is a naked sparanoid dot com, a site now running without stylesheets.


«

Wordpress Plugin: Quotmarks Replacer

English

Quotmarks Replacer is a plugin disables wptexturize founction that keeps all quotation marks and suspension points in DBC case.

Update

2.1:

2.0 beta:

1.20 beta:

1.1.0 beta:

1.0.5 beta:

1.0.4 beta:

1.0.3 beta:

1.0.2 beta:

1.0.1 beta:

Installation

This plugin is released under the GPL license. Feel free to use it but please do not remove credit infomation.

Download / qmr21.zip / 1.27 KB

简体中文

Quotmarks Replacer 是一个通过禁用 wptexturize 函数,解决 WordPress 自动将半角的单引号、双引号和省略号转换为全角标点的问题。使后台输入的标点格式与前台读者浏览的标点格式保持一致的插件。

更新

2.1:

2.0 beta:

1.20 beta:

1.1.0 beta:

1.0.5 beta:

1.0.4 beta:

1.0.3 beta:

1.0.2 beta:

1.0.1 beta:

安装

此插件基于 GPL 发布。免费使用,但请不要删除其中的版权信息。

下载 / qmr21.zip / 1.27 KB

Demo
Original texts:
Original texts

Before using:
Before using

After using:
After using

Also see the original post:
http://sparanoid.com/blog/quotations-test-by-sparanoid-sparanoid/


/ Quotmarks Replacer / TB / Commt


Just 48 Comments?

~raenoll

i love this plugin,
thanks for sharing.
it really makes blog texts normal, but blog title.
how can i make it too?
i also notice that the results are different between ie and firefox.
in ie, my blog title's in SBC, and browser title's in DBC.
in firefox, first in DBC, and second in SBC.

~Sparanoid

To Raenoll:

Is there anything wrong? I just saw ur blog in ie and firefox browser and couldn't find the bug u reported :(

The title and browser title are both the same in ie and firefox...

~raenoll

ie1
ie2
firefox

that's weird.

~Sparanoid

To Raenoll:

Sorry for my mistake let you waited so long, didn't know why your lastest comment is treated as a spam :(

and about the bugs, the problems in the 1st and the 2nd snap have been fixed, now I changed this new version and you'll have a new look:)

about the shit in firefox, errrr.. I really don't know why:
http://img7.picsplace.to/img7/5/snap_raenol_dot_com_000.jpg

~Juvenall Wilson

First, thanks for putting this together. This was such a problem, I was using a string replace directly in the templates. Not exactly the best solution. This seems to do the trick perfectly. You just made many readers on several of my blogs very, very happy..lol.

Second, in case you didn't figure out why, WordPress will, by default, flag comments with more than one URL for review. You can bump this setting under Options.

Again, thanks a ton for this. :D

~Sparanoid

Updated today, v1.0.2, now also convert suspension points(…) into DBC case(...). But I think it's more than just a quotation marks replacer now :D

~Servant

Sorry, but I don't know what to do with a file with a "7z" format. Is this compressed or should it be saved with a different ending? I can't seem to open it. Thanks!

~Sparanoid

You can use WinRAR (newest version) or 7-Zip to open it.

This file is compressed by 7-Zip.

~domecc

Good Job!

~seeker

看不懂,郁闷。

~Sparanoid

To seeker:

在 WP 后台写文章时,如果输入半角双引号(")、半角单引号(')、半角省略号(...),这些在前台都会被转成全角的“” ‘’ …

这个插件就是解决此问题的……

~poo

seen

签名:My Blog
--------------------------
http://xiangtool.nease.net/blog

~Sparanoid

呵呵,不管你到这里来广告出于什么目的,我是不会去点你的连接的,当然,希望你会看到这条消息,另外,也感谢你给我的 blog 增加了访问量。虽然我没用计数器,谁都看不到的

~Rainux

不错的插件,比偶以前用的野蛮办法优雅多了,呵呵。

~herllin

非常感谢能开发这么好的插件。不过我有一点小问题
$this->query("SET NAMES 'utf8'");
在我的wordpress上,8后面的‘还是变成全角的了。

~Boiling Soul

poo / 01132006, 20:11:

seen

签名:My Blog
--------------------------
http://xiangtool.nease.net/blog

Sparanoid / 01132006, 21:23:

呵呵,不管你到这里来广告出于什么目的,我是不会去点你的连接的,当然,希望你会看到这条消息,另外,也感谢你给我的 blog 增加了访问量。虽然我没用计数器,谁都看不到的

一个流氓而已。
我纳闷为什么WP要转换引号,防SQL Injetion?

~Sparanoid

herllin / 01282006, 20:17:

非常感谢能开发这么好的插件。不过我有一点小问题
$this->query("SET NAMES 'utf8'");
在我的wordpress上,8后面的‘还是变成全角的了。

感谢,问题已解决,见 1.0.3 版

Boiling Soul / 01282006, 23:13:

一个流氓而已。
我纳闷为什么WP要转换引号,防SQL Injetion?

我不怎么会 mysql 哦……和防止数据库注入有什么关系?

~Boiling Soul

简单的例子:
SQL里面用引号作query的起始和结束,如果直接插入用户数据可能会构造出SQL注射,即执行用户输入的数据(可能是SQL语句,如删除POST表)。
可以看看PHP中的add_slashes()函数的介绍。

~Sparanoid

嗯……貌似明白点了,所以用 """ 替换就没问题了吧

~herllin

这么快就修正了啊,谢谢。(^_^)

~Boiling Soul

呃 PHP里面一般用转义符 和C差不多
像单引号是特殊符号会加一个 \ 就成了 \'
转换成& quot;是可以,但是如果不是用在显示HTML的话会导致歧义(例如说RSS FEED里面)

~Boiling Soul

其实我到现在还不理解WP这样作的目的,上WP问问先…………

~Sparanoid

Boiling Soul / 01292006, 11:07:

其实我到现在还不理解WP这样作的目的,上WP问问先…………

貌似数据库里显示的和后台输入的格式是一样……只不过 wp-includes\functions-formatting.php 又给转了一下,前台显示的不一样

~Boiling Soul

所以只是前台显示的时候转了,难以理解,难道是故意为难你这种IE的粉丝。

瓦咔咔

~Erac

sparanoid你好~我是今天刚刚知道这个插件的,很喜欢,真的解决了大问题,但是我在应用中有一些问题:

http://erac.fuzhongxp.com/?p=19

我不是在AD……不要误会,这个链接是我出问题的文章。安装插件之前,半角单引号被替换为全角单引号,半角双引号被替换成了另外一种全角符号[″]。
我重新编辑文章后,单引号的过滤被禁止了,但是双引号的过滤却依然存在。详情还是看一看我上面的链接吧……当然如果明瞭了也就不用点了……

期待回复~因为我不太记事……不知道以后要是有更新或者就我的问题有什么回复能不能mail我一个~谢谢LA~

~Sparanoid

已更新

~Eimo

符号测试
^ ^

>_

~取代

不错哦,收下了

~yskin

很好奇,为什么直接替换回来不会替换到原来就是全角的字符呢?

~Sparanoid

被转换的标点都会被 WordPress 替换成 &#****; 的形式,然后再输出,而自己输入的全角不会被转换,直接输出。所以就可以区别哪些全角是被 WordPress 替换的了

~SJ

Thank you so much for this plugin!

~Nico

Cool, thank you so much!

~大宇

好东西。这个插件非常好用。

~Fio

download。。。

Not Found

The requested URL /download/qmr2b.zip was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

囧|||

~Sparanoid

url fixed, try again

~Dickey

己安装使用,谢谢!!

~Charles

我以前一直没有这个问题的,不知道为什么,突然就出现了。你是彻底禁止了转换,还是转换成了别的东西?

这个东西我也不是很明白,最近我受特殊字符问题困扰很严重。是不是'对于浏览器来说,比半角单引号更加安全呢?如果是的话,是不是干脆转换成这个更好一点呢?

~Sparanoid

@Charles: 在这个插件 2.0 版本之前,使用的替换的方式将全角替换为半角的,2.1 采用了禁用 wp 替换半角为全角的函数来使标点保持不变的


Trackbacks & Pingbacks


Add Your Comment




Your Comment:

Essential XHTML tags are allowed ( ). URLs are automatically converted into hyperlinks. Email addresses will never be published.