Decode Numeric HTML Entities in ColdFusion?

前端 未结 4 1433
花落未央
花落未央 2020-12-06 12:15

I need a way to transform numeric HTML entities into their plain-text character equivalent. For example, I would like to turn the entity:

é
         


        
4条回答
  •  没有蜡笔的小新
    2020-12-06 12:22

    Here's another function that will decode all the numeric html character entities in a string. It doesn't rely on xml parsing so it will work on strings that contain unbalanced xml tags. It's not efficient if the string has a large number of entities, but it's pretty good if there are none/few. I have only tested this on Railo, not AdobeCF.

    
        
        
        
            
            
        
        
            
        
        
    
    

提交回复
热议问题