I have var called htmlcode:
<table width="600" align="center" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3"><img width="600" height="60" alt="" src="nieuwsbrief_banner.gif</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
</tbody>
</table>
I want to remove all occurrences of . I am able to replace other characters in a string, but can't seem to replace into an empty string (""). I did this:
<cfset htmlcode = Replace(htmlcode, " ", "", "all")>
I also tried replacing nbsp; (without the & in the beginning). The result was that all were changed into &. I then tried <cfset htmlcode = ReplaceNoCase(htmlcode, "&", "", "all")> but this didn't remove any occurrences of &.
What should do?
To strip   you need to search for chr code 160.
<cfset htmlcode = Replace(htmlcode, chr(160), "", "all")>
https://web.archive.org/web/20180305075110/http://www.cjboco.com/blog.cfm/post/table-of-ascii-characters-and-symbols-for-coldfusion
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With