CS Nuggets

This blog is for addons, bugs, fixes, and issues pertaining to Community Server.

CS: BUGFIX: CommunityServer.Components.HtmlScrubber: Removing spaces

The CommunityServer.Components.HtmlScrubber is removing spaces from "src" and "href" attributes, which it shouldn't be doing.  If you use the "basic blue" theme, or any other theme that has a space in it, images may not display.  The following changes correct the issue:

CommunityServer.Components.HtmlScrubber.cs:

Change line 61 from:

static Regex filterdCharacters = new Regex("\\=|\\\"|\\'|\\s|\"'", RegexOptions.Compiled);

to:

static Regex filterdCharacters = new Regex("\\=|\\\"|\\'|\"'", RegexOptions.Compiled);

Change line 63 from:

static Regex bannedChars = new Regex("\\s", RegexOptions.Compiled);

to:

static Regex bannedChars = new Regex("", RegexOptions.Compiled);

Leave a Comment

(required) 

(required) 

(optional)

(required)