Click or drag to resize
HTMLHelperStripTags Method (String, Boolean, Boolean, String, String, String)
Remove HTML tags from text.

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 8.2.23
Syntax
C#
public static string StripTags(
	string htmlText,
	bool replaceEntities,
	bool replaceComments,
	string tagReplacement,
	string entitiesReplacement,
	string commentsReplacement
)

Parameters

htmlText
Type: SystemString
HTML text
replaceEntities
Type: SystemBoolean
True if replace special entities
replaceComments
Type: SystemBoolean
Whether to replace HTML comments
tagReplacement
Type: SystemString
Replacement for HTML tags - inner of tag is string "$2"
entitiesReplacement
Type: SystemString
Replacement for HTML entities
commentsReplacement
Type: SystemString
Replacement for HTML comments

Return Value

Type: String
See Also