diff --git a/smart_service/apis/v2/master.py b/smart_service/apis/v2/master.py index a15ca24..023418c 100644 --- a/smart_service/apis/v2/master.py +++ b/smart_service/apis/v2/master.py @@ -4,16 +4,39 @@ from urllib import request import datetime from frappe import utils import json +import html import os from smart_service.apis.app_user_login import input_validation from frappe.utils import cstr + site_name = cstr(frappe.local.site) BASE_URL = os.path.expanduser( "~") + "/frappe-bench/sites/" + site_name + "/public" + date_format = "%Y-%m-%d %H:%M:%S.%f" current_db_name = frappe.conf.get("db_name") +# style="""""" + @frappe.whitelist(methods=["POST"], allow_guest=1) def get_role_mapping(): @@ -171,12 +194,43 @@ def new_publish(): elif module == 'QWIK Service': flag, data = get_qwik_service(variant, language) - CLEANR = re.compile('<.*?>') + CLEANR = re.compile('<.*?>') + CLEANR_back_slash = re.compile("\"") + ul_html='' + find_last_ul='' + for dt in data: if len(dt['consumables'])>0: for con in dt['consumables']: if con['content']: con['content'] = re.sub(CLEANR, '', con['content']) + if dt['qwik_procedure']: + for qp in dt['qwik_procedure']['LHS']: + if qp['content']: + qp['content'] = re.sub('