From: Martin G. <mar...@un...> - 2006-03-26 17:11:29
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Now I have the rigth patch for bug 1220176. (patch is attached) The Problem is that the original RegExp matches also quotation marks. This can lead to problem with Richtext. Example: msg = "\"http://www.example.com\""; reURL = "(\\b|^)(\\w+://\\S+)(\\s|$|\\n)"; msg.find(reURL) url = reURL.cap(2); link = "<a href=\"" + url + "\">" + url + "</a>"; here: url will be "http://www.example.com\"" link will be "<a href=\"http://www.abc.com\"\">http://www.abc.com\"</a> You can see that there are to many quotation marks which will be later interpreted as Richtext/HTML. The patch replaces the RegExp. regards, rsLeo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFEJry2uFcJvHsEu9gRAlDOAJkBrJvr6eGImlE6APtSWbK+bERW4ACdF9DP VKbD+hSgqJeTzGMgUpoeAns= =Y3oE -----END PGP SIGNATURE----- |