return {
/**
- * Escape a string for HTML. Converts special characters to HTML entities.
+ * Escape a string for HTML.
+ *
+ * Converts special characters to HTML entities.
*
* mw.html.escape( '< > \' & "' );
* // Returns < > ' & "
*
* @param {string} s The string to escape
+ * @return {string} HTML
*/
escape: function ( s ) {
return s.replace( /['"<>&]/g, escapeCallback );
* - this.Cdata: The value attribute is included, and an exception is
* thrown if it contains an illegal ETAGO delimiter.
* See <http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.3.2>.
+ * @return {string} HTML
*/
element: function ( name, attrs, contents ) {
var v, attrName, s = '<' + name;