improved htmlfree

Platform:  mIRC
Published  Oct 22, 2007
Updated  Oct 27, 2007
Hello all of you,

This is just a slightly different version of the normal htmlfree
What I did was I fixed some stuff that 2 words might show up as one
and a way to strip the line into more lines I'll give a example:

Sometimes this happens when reading from a website:

Hi I'm Rick...How are you

With this htmlfree:

Hi I'm Rick... How are you.

Sometimes on the website you see 2 lines, but when you read it, it shows up with only 1 line:

Website:

Hi I'm Rick...

How are you?

This will show up:

Hi I'm Rick...How are you?

=================================

When you use $htmlfree() then it will replace the "enters" with $chr(20) (This is just a random character that's not being used) so you can do this: $gettok($htmlfree(),2,20) alias -l htmlfree {
var %x, %i = $regsub($replace($1-,<td>,$chr(32),<tr>,$chr(20),<br>,$chr(20)),/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
return %x
}

Comments

Sign in to comment.
Freckle   -  Jul 24, 2009
$chr(32) will replace <td>, <td> means it will go to the next column.
 Respond  
Solitude   -  Jul 14, 2009
Since I love bringing up old stuff.. What would making it with $chr(32)?
 Respond  
Freckle   -  Oct 27, 2007
Ah right. forgot about that tag, thanks. * script edited *
 Respond  
KuTsuM   -  Oct 27, 2007
What if the website used <br> tags? Might as well add that in too.
 Respond  
Freckle   -  Oct 23, 2007
True =)
<tr> is on a website a \"enter\" but when you read it via IRC, it will mostly show up on the same line. That\'s why I put this in
 Respond  
Gummo   -  Oct 23, 2007
Yes, but $chr(20) IS the separator, meaning that your script separates them. ;)
 Respond  
Freckle   -  Oct 23, 2007
no, it changes <tr> with $chr(20) which is nothing, but you can then easily use the $gettok($htmlfree($1),2,20) to seperate them
 Respond  
Gummo   -  Oct 23, 2007
It\'s different because it separates sections within <tr> tags, as well as changing <td> to a space.
 Respond  
Gummo   -  Oct 23, 2007
$htmlfree makes use of a regular expression to remove HTML tags from text. This is an alternate version of it.
 Respond  
Freckle   -  Oct 23, 2007
lol, is there anyone that could explain it better then me?
I find this hard to explain people
 Respond  
Nick   -  Oct 22, 2007
?.....*Confuzzled*
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.