[fix] sanitize html of product bundle description
This commit is contained in:
parent
ade5b82167
commit
4b207647db
@ -257,4 +257,5 @@ erpnext.patches.v6_20x.set_compact_print
|
|||||||
execute:frappe.delete_doc_if_exists("Web Form", "contact") #2016-03-10
|
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_20x.remove_fiscal_year_from_holiday_list
|
||||||
erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po
|
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
|
||||||
|
11
erpnext/patches/v6_20x/update_product_bundle_description.py
Normal file
11
erpnext/patches/v6_20x/update_product_bundle_description.py
Normal 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)
|
Loading…
x
Reference in New Issue
Block a user