Sitecore 5.1.1 API

MainUtil.EscapePling Method 

Escapes plings (') or quotes (") in a HTML tag attribute value.

[Visual Basic]
Public Shared Function EscapePling( _
   ByVal attribute As String _
) As String
[C#]
public static string EscapePling(
   string attribute
);

Parameters

attribute
An attribute value.

Return Value

The escaped value.

Remarks

When adding attribute values to an HTML tag, it can be necessaty to escaping single quotes (plings or "'") in the value.

Example

[CS]
string attr = MainUtil.EscapePling("Allan's attribute"); // "Allan's attribute"
    

See Also

MainUtil Class | Sitecore Namespace