improved htmlfree

By Freckle on Oct 22, 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:


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


Sign in to comment.
Freckle   -  Jul 24, 2009

$chr(32) will replace

, means it will go to the next column.
Solitude   -  Jul 14, 2009

Since I love bringing up old stuff.. What would making it with $chr(32)?

Freckle   -  Oct 27, 2007

Ah right. forgot about that tag, thanks. script edited

KuTsuM   -  Oct 27, 2007

What if the website used
tags? Might as well add that in too.

Freckle   -  Oct 23, 2007

True =)

Gummo   -  Oct 23, 2007

Yes, but $chr(20) IS the separator, meaning that your script separates them. ;)

Freckle   -  Oct 23, 2007

no, it changes

Gummo   -  Oct 23, 2007

It\'s different because it separates sections within

to a space.
Gummo   -  Oct 23, 2007

$htmlfree makes use of a regular expression to remove HTML tags from text. This is an alternate version of it.

Freckle   -  Oct 23, 2007

lol, is there anyone that could explain it better then me?
I find this hard to explain people

Nick   -  Oct 22, 2007


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.