Plugin Request?

I was wondering if someone can make a plugin that would remove html links in chat.

We have several users that need to have msn ability so we have the gateway plugin

installed. The problem is may of the links sent via MSN are bogus and have caused

problems. I would like the ability to turn off http links. Would this be difficult to do, or

fairly easy, I would think pretty easy, just look for a <a href=> and remove that…

Thanks

how about using the content filter to do this.

Ok, I had looked at that but didn’t think it would work. I read a bit about it, and I do not

know how to formulate a regex to remove the link. I don’t want to just reject the

messages because there are times we (employees) need to send links and they can

just copy and paste them, we just do not want them to blindly go clicking around and

infecting the network.

So if I’m looking to remove a standard link…

W3C

and I only want the “www.w3.org” to show but strip the <a href= part how would I do that?

you can’t with the content filter

I didn’t think so, thats why I wanted to see if it would be hard to make a plugin

that would do that. Like a plain text email, no rich text or html plugin…

Hi,

do you really send links using a href? When using Spark one will send “www.w3.org” and XMPP will transfer only this text and the receiving client will convert this into a HTML link. So it seems to be a client issue.

If “a href” is in the xmpp message and you want to get rid of the link rid you may want to use a pattern like

<a href=

and mask it with

<a href='#' url=

LG

*fixed filter: " seems to cause problems to be displayed by the plugin, while ’ works much better

LG, thanks for the clarification. I’m not sure how the links come but so far in the last 2 weeks we have seen more than 20 fake messages sent with links that when the person clicks on it, it will send the same thing to all their contacts and try to spread a virus. We have anti-virus and malwarebytes running but its really annoying to have this happen and yet users still click the stupid links. I’m trying to prevent the links from being clickable.

Hi,

is it a client issue which you want to fix on server side?

You could use the source of the content filter and extend it to do what you want.

A simple thing I can think of is to parse for “.(org|com)” and replace it with “_$1” , so “www.sun.com” gets converted to “www.sun_com”. Try this pattern and mask:

\.(org|com)
_$1

You may need to add some more top level domains which you want to “block”, seperate them with the pipe “|”.

LG

LG, thanks that works great