Topic: Yeeeeeeees! I got it! I won the challenge! Function to strip html tags

Guys, it is with great joy that I come here to say that I have won yet another challenge!
I needed a lot to develop an algorithm to escape html tags, since I've been working a lot on bgt lately, but separating information from html tags was very tedious!
Again, there was no native function to help me, such as exists in php for example, and again, I had to think of a solution.
So today, when I was at my place of work, I thought to myself, "I'll do it, it's not possible ..." ... Well, that's the result!
Please note that this is a very simple code, which escapes almost all html tags, but codes that work on the client side (javascript, css, and so on) can remain in the text. Even so, this helps a lot to search for some information that you know is on the page, for example, but that can change places, so it is very complicated to intercept with the html tags.
That said, so that you have no doubt how to use this code, a brief explanation follows:

Create a script with any name and add this code below:
#include "strip_tags.bgt"
http t;
string test;
void main(){
while (t.progress) test+=t.request();
show_game_window ("Test");
alert ("test",string_with_tags);

If you want, you can take this last statement, just to show the result of the page already without the html tags.
The string_with_tags variable is global, and it is with it that you get the result.
That simple!
This function even exchanges some special characters in the html (&aacut, &eacut, etc), by the original characters (á, é, etc).
There may be others that need to be added, so anyone who wants to tinker with the code and contribute, can feel free!
Download Link: … s.bgt?dl=1

Re: Yeeeeeeees! I got it! I won the challenge! Function to strip html tags


after ages, I'm finally back up and running with a new computer, and getting back to you as I promised! I'm so sorry it took so freaking long.

You are awesome, this is really brilliant and should definitely come in handy in a lot of cases. We can build on this and make a sort of extensive complex library for advanced string manipulation out of it.

You were looking for some old scripts that are no longer available for download, and we were considering the thought of hosting a central repository for BGT includes. If you are still interested in either of that and have the time to discuss it further, feel free to e-mail me and get in touch privately so that we don't clutter the forum.

I'll be looking forward to a mail.