diff --git a/core/modules/widgets/view.js b/core/modules/widgets/view.js index 13dc0fdb0..5e1fa9a01 100755 --- a/core/modules/widgets/view.js +++ b/core/modules/widgets/view.js @@ -55,6 +55,9 @@ ViewWidget.prototype.execute = function() { case "htmlwikified": this.text = this.getValueAsHtmlWikified(); break; + case "htmlencodedplainwikified": + this.text = this.getValueAsHtmlEncodedPlainWikified(); + break; case "htmlencoded": this.text = this.getValueAsHtmlEncoded(); break; @@ -132,6 +135,10 @@ ViewWidget.prototype.getValueAsHtmlWikified = function() { return this.wiki.renderText("text/html","text/vnd.tiddlywiki",this.getValueAsText(),{parentWidget: this}); }; +ViewWidget.prototype.getValueAsHtmlEncodedPlainWikified = function() { + return $tw.utils.htmlEncode(this.wiki.renderText("text/plain","text/vnd.tiddlywiki",this.getValueAsText(),{parentWidget: this})); +}; + ViewWidget.prototype.getValueAsHtmlEncoded = function() { return $tw.utils.htmlEncode(this.getValueAsText()); };