[fix] sanitize html of product bundle description

This commit is contained in:
Anand Doshi 2016-04-05 18:34:11 +05:30
parent ade5b82167
commit 4b207647db
2 changed files with 13 additions and 1 deletions

View File

@ -257,4 +257,5 @@ erpnext.patches.v6_20x.set_compact_print
execute:frappe.delete_doc_if_exists("Web Form", "contact") #2016-03-10
erpnext.patches.v6_20x.remove_fiscal_year_from_holiday_list
erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po
erpnext.patches.v6_27.fix_recurring_order_status
erpnext.patches.v6_27.fix_recurring_order_status
erpnext.patches.v6_20x.update_product_bundle_description

View File

@ -0,0 +1,11 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import sanitize_html
def execute():
for product_bundle in frappe.get_all('Product Bundle'):
doc = frappe.get_doc('Product Bundle', product_bundle.name)
for item in doc.items:
if item.description:
description = sanitize_html(item.description)
item.db_set('description', description, update_modified=False)