Creative Juices Bo. Co.

Satisfy Your Thirst For Something Refreshing!

Ported CJ Html Parser to ColdFusion

Now that I wrapped up the JavaScript version of this function, I thought I would go ahead and create a ColdFusion version as well. The big difference between the two functions is that JavaScript will allow you to use a function pointer in the replace-string portion of the regular expression replace function. ColdFusion does not allow us to do that, but there is a pretty cool function that I used, ReplaceList(). This function will find a match in one list and replace it with the corresponding list index item in another string. Other than that it's pretty identical to the CJ Html Parser function.

Note: CJ Html Parser was formally known as Html2Ascii