Hi there,
I've got an .asp page scripted as an xml page, but i'm having some issues with html entities. I have a feed with products and obviously a product description.
The following person of code correctly formats '&' as '&' but I also need to catch instances of the registered mark and make that into the html entity.
Dim varOrgText, varDisplayText
If (rsproducts.Fields.Item("prod_description").Value) <> "" Then
varOrgText = (rsproducts.Fields.Item("prod_description").Value)
varFormattedOrgText = (Replace(varOrgText, "&", "&"))
varDisplayText = "<![CDATA[" & varFormattedOrgText & "]]>"
End If
I tried doing this to catch the ampersand and registered marks;
Dim varOrgText, varDisplayText
If (rsproducts.Fields.Item("prod_description").Value) <> "" Then
varOrgText = (rsproducts.Fields.Item("prod_description").Value)
varFormattedOrgText = (Replace(varOrgText, "&", "&"))
varFormattedOrgText2 = (Replace(varOrgText, "®", "®"))
varDisplayText = "<![CDATA[" & varFormattedOrgText2 & "]]>"
End If
But obviously it didn't work, so i'm looking for an easier way of formatting the description.
Would be grateful for any help to make this a bit easier. :)
Thank you.