mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Most of the existing author tags are grossly out of date at this point. The definitive reference for who has contributed what is available at https://github.com/jsdoc3/jsdoc/graphs/contributors.
21 lines
488 B
JavaScript
21 lines
488 B
JavaScript
/**
|
|
* Escape HTML tags in descriptions.
|
|
*
|
|
* @module plugins/escapeHtml
|
|
*/
|
|
'use strict';
|
|
|
|
exports.handlers = {
|
|
/**
|
|
* Translate HTML tags in descriptions into safe entities. Replaces <, & and newlines
|
|
*/
|
|
newDoclet: function(e) {
|
|
if (e.doclet.description) {
|
|
e.doclet.description = e.doclet.description
|
|
.replace(/&/g, '&')
|
|
.replace(/</g, '<')
|
|
.replace(/\r\n|\n|\r/g, '<br>');
|
|
}
|
|
}
|
|
};
|