Sanitize your bio after you save it and render it to yourself.

This commit is contained in:
Neil Lalonde 2014-01-16 16:12:34 -05:00
parent 7c8ea8c166
commit 09ed7fe283

View File

@ -63,7 +63,7 @@ Discourse.PreferencesController = Discourse.ObjectController.extend({
if (Discourse.User.currentProp('id') === model.get('id')) { if (Discourse.User.currentProp('id') === model.get('id')) {
Discourse.User.currentProp('name', model.get('name')); Discourse.User.currentProp('name', model.get('name'));
} }
self.set('bio_cooked', Discourse.Markdown.cook(self.get('bio_raw'))); self.set('bio_cooked', Discourse.Markdown.cook(Discourse.Markdown.sanitize(self.get('bio_raw'))));
self.set('saved', true); self.set('saved', true);
}, function() { }, function() {
// model failed to save // model failed to save