ejabberd - Comments for "mod_muc: recognise more URI schemes in logged HTML (htmlize())?" https://www.ejabberd.im/node/1568 en The patch was commited to https://www.ejabberd.im/node/1568#comment-28093 <p>The patch was commited to ejabberd SVN. So next version of ejabberd will have this enhancement.</p> Tue, 17 Jul 2007 08:28:34 +0000 mfoss comment 28093 at https://www.ejabberd.im I updated your patch to https://www.ejabberd.im/node/1568#comment-25278 <p>I updated your patch to ejabberd SVN and submitted here: <noindex><a href="https://support.process-one.net/browse/EJAB-279" rel="nofollow" >Recognise more URI schemes in logged HTML</a></noindex>.</p> <p>I guess it will be applied soon.</p> Tue, 03 Jul 2007 17:44:04 +0000 mfoss comment 25278 at https://www.ejabberd.im afterthought https://www.ejabberd.im/node/1568#comment-25258 <p>'&gt;' should probably end a URL also.</p> Sun, 01 Jul 2007 00:08:06 +0000 qu1j0t3 comment 25258 at https://www.ejabberd.im something like this? https://www.ejabberd.im/node/1568#comment-25257 <p>I think this works okay. I included single quote as well as your suggestions.</p> <pre> --- ejabberd-1.1.3-dist/src/mod_muc/mod_muc_log.erl 2006-09-22 03:58:58.000000000 -0400 +++ ejabberd-1.1.3/src/mod_muc/mod_muc_log.erl 2007-06-30 16:21:17.066776505 -0400 @@ -657,7 +657,7 @@ S2 = element(2, regexp:gsub(S1, "\\&amp;", "\\&amp;")), S3 = element(2, regexp:gsub(S2, "&lt;", "\\&lt;")), S4 = element(2, regexp:gsub(S3, "&gt;", "\\&gt;")), - S5 = element(2, regexp:gsub(S4, "(http|ftp)://.[^ ]*", "&lt;a href=\"&amp;\"&gt;&amp;&lt;/a&gt;")), + S5 = element(2, regexp:gsub(S4, "[-+.a-zA-Z0-9]+://[^] )\'\"}]+", "&lt;a href=\"&amp;\"&gt;&amp;&lt;/a&gt;")), S5. get_room_info(RoomJID, Opts) -&gt; </pre> Sat, 30 Jun 2007 20:26:48 +0000 qu1j0t3 comment 25257 at https://www.ejabberd.im There are a lot of schemes https://www.ejabberd.im/node/1568#comment-10998 <p>There are a lot of schemes at IANA, and maybe more on the future. So I think it's better to simply check for lexically valid scheme. Do you have knowledge/interest enought to try to write such a patch?</p> <p>I found another related problem, maybe you can/want try to fix this too: when a message has an URI inside brackets, like:</p> <pre>Check the JSF site (<noindex><a href="http://www.jabber.org" title="http://www.jabber.org" rel="nofollow" >http://www.jabber.org</a></noindex>)</pre><p>the generated HTML does an ugly thing with the ending bracket:</p> <pre>Check the JSF site (&lt;a href="http://www.jabber.org)"&gt;http://www.jabber.org)&lt;/a&gt;</pre><p>I guess it should handle correctly characters like "", (), [], {}... </p> <p>If you will not, tell me and I'll try on the following days.</p> Tue, 05 Jun 2007 14:29:53 +0000 mfoss comment 10998 at https://www.ejabberd.im