-----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-----
--- licq_orig/plugins/qt-gui/src/mlview3.cpp 2004-11-09 22:42:50.000000000
+0100
+++ licq_patched/plugins/qt-gui/src/mlview3.cpp 2006-03-26 17:24:05.405328552
+0200
@@ -92,8 +92,8 @@
int pos = 0;
if (highlightURLs && (pos = text.find(reAHREF, pos)) == -1)
{
- QRegExp reURL("(\\b|^)(\\w+://\\S+)(\\s|$|\\n)");
- reURL.setMinimal(true);
+ QRegExp
reURL("(\\b|^)(\\w+://[a-zA-Z0-9][-a-zA-Z0-9_.!~*'();/?:@&=+,$]+)");
+ reURL.setMinimal(false);
pos = 0;
while ( (pos = text.find(reURL, pos)) != -1 ) {
QString url = reURL.cap(2);