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!
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:
while (t.progress) test+=t.request();
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.
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!
https://www.dropbox.com/s/2f4huy7y7gqaq … s.bgt?dl=1