Skip to content

Commit

Permalink
fix: escape html from workspace title
Browse files Browse the repository at this point in the history
(cherry picked from commit f1f23f4)
  • Loading branch information
shariquerik authored and mergify[bot] committed May 8, 2023
1 parent 15df963 commit e68fc43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frappe/public/js/frappe/views/workspace/workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ frappe.views.Workspace = class Workspace {
],
primary_action_label: __("Update"),
primary_action: (values) => {
values.title = frappe.utils.escape_html(values.title);
let is_title_changed = values.title != old_item.title;
let is_section_changed = values.is_public != old_item.public;
if (
Expand Down Expand Up @@ -1142,6 +1143,7 @@ frappe.views.Workspace = class Workspace {
],
primary_action_label: __("Create"),
primary_action: (values) => {
values.title = frappe.utils.escape_html(values.title);
if (!this.validate_page(values)) return;
d.hide();
this.initialize_editorjs_undo();
Expand Down

0 comments on commit e68fc43

Please sign in to comment.