mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 7
X
XiXaQ Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
X
Joined: Mar 2003
Posts: 7
Hi.. Look at this:
(For HTML Log)

on *:TEXT:*:#:{
write -c file $replace($1-,<,&lt;,>,&gt;,&lt;,&amp;lt,&gt;,&amp;gt)

}

First, All <'s are replaced with &lt;. Then, all &lt;'s are replaced with &amp;lt. The result, is; when a user sais < in the channel, it cannot be displayed as < on the web...

Why doesn't $replace everything at once?

Thanks
XiXaQ

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
How is this a bug? To me it looks like this is the way it was intended to work.

Why not use $replace($1-,&lt;,&amp;lt,&gt;,&amp;gt,<,&lt;,>,&gt;) instead?

Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Replace is intended for very simple replacements, if you want more complex replacements, then use regex.


Link Copied to Clipboard