Xbasic

a5_removescripttags Function

Syntax

C a5_removeScriptTags(C html )

Arguments

htmlCharacter

The HTML that contains the <script> tags to remove.

Returns

resultCharacter

Returns the HTML with the <script>tags removed.

Description

Removes <script> tags from HTML text.

Example

dim html as c =<<%html%
<h1>Welcome</h1>
<script type="text/javascript">
alert("This is a script!");
</script>
<p>Welcome to my page.</p>
<script>
This is another script!
</script>
%html%

? a5_removeScriptTags(html)
= <h1>Welcome</h1>

<p>Welcome to my page.</p>