GetSafeHtmlFragment replaces double spaces with single

Feb 9, 2010 at 10:22 AM

I'm using AntiXss 3.1.3524.16873 to clean data in a file I am uploading.

 

It seems that GetSafeHtmlFragment replaces double spaces with single spaces.

e.g. "A  B" gets replaced with "A B".

This is a problem for me as some of the data I'm cleaning is a fixed length string that might contain double spaces in the middle.

Is this correct behavior?

Any suggestions of a way round it (other than replacing all the spaces with some other character, them replacing them back after)?

 

Thanks in advance - Ben

Coordinator
Feb 23, 2010 at 7:25 PM

This could be an issue with safe html normalizing the HTML. Next version of WPL includes overloaded method to specify normalization.

Thanks

RV

From: BenDessau [mailto:notifications@codeplex.com]
Sent: Tuesday, February 09, 2010 3:23 AM
To: Anil Revuru (INFORMATION SECURITY TOOLS)
Subject: GetSafeHtmlFragment replaces double spaces with single [AntiXSS:83677]

From: BenDessau

I'm using AntiXss 3.1.3524.16873 to clean data in a file I am uploading.

It seems that GetSafeHtmlFragment replaces double spaces with single spaces.

e.g. "A B" gets replaced with "A B".

This is a problem for me as some of the data I'm cleaning is a fixed length string that might contain double spaces in the middle.

Is this correct behavior?

Any suggestions of a way round it (other than replacing all the spaces with some other character, them replacing them back after)?

Thanks in advance - Ben

Read the full discussion online.

To add a post to this discussion, reply to this email (AntiXSS@discussions.codeplex.com)

To start a new discussion for this project, email AntiXSS@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Feb 24, 2010 at 7:38 AM

Thanks for your reply.

 

Cheers - Ben