Hello, in this video I am going to show you how to remove characters from a string that have an ASCII value of greater than 127. So this basically allows us to sanitize the string image or HTML tags and you know special characters. So to do that, I'm going to use the filter wall command to first of all, create a string. So equal to this is going to have some HTML, so I'm gonna put h1 h1, and I'll put Hello I'm still though there was other crazy special characters, you will need them as well. So if we just go to Alaska tempo due diligence Some value. So all of these characters are valid, anything that's not here, including those.
So these will not be valuable remove all these crazy characters. It will also remove locks at HTML tags because a tag is you notice a less than greater than potentially a backslash and then just a combination of letters and numbers like h1 div, you know p, for example, individually they are valid but with what we're going to do is we'll move them first grade for sanitization. So now what we're going to say is, you know, string equal filter on the scoreboard. First of all, you specify the string that you want to sanitize. Next, justify what you want to do to funny toys. A string There we go.
Next you specify, you know how we want to strip it and we do filter on the score flag on the score strip. So we can just do backtick high or low. So we want to do high which will, you know, remove literally everything else keep basic characters there, an echo. So, we're gonna, I'm gonna echo string first and just put a new line tag. Then I'm gonna echo and I'm gonna echo soundtoys so you can see the difference. So as you can see, we've got the strength and the differences, the tag is no longer there.
So let me inspect the element itself. So if I inspect it, that will click inspect. of clickfunnels Okay, so if I go here, as you see this is got the h1 wrapped around it. This is just a regular string, so it's moved up and he would have removed any of the extended ASCII characters as well. But that is how you sanitize a string or remove all characters that have an ASCII value of greater than hundred and 27. So if you can remove HTML tags, and you can remove the extended ASCII character set from a string without disturbing the rest of the regular string itself, really simple.
You don't have to do some crazy loop yourself to be able to go everything and should do the comparison. It does do for you very optimized, really cool. So that's it. If you have any questions, feel free to drop me a message. And as usual, I look forward to seeing you in the next video.