mht_brerp10
.adempiere
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
encodehtml(text)
Parameters
Name
Type
Mode
str
text
IN
Definition
from re import compile from re import sub from html import escape if str is None: return str pattern = compile('<.*?>') local_str = sub(pattern, '', str) escape_map = { # '\\' : '\\\\', #'`' : '\`' , #'_' : '\_' , #'*' : '\*' , '{' : '{' , '}' : '}' , #'[' : '\[' , #']' : '\]' , #'#' : '\#' , #'+' : '\+' , #'-' : '\-' , #'.' : '\.' , #'!' : '\!' , '\n' : '' , '\t' : '' , '\r' : ''} for search, replace in escape_map.items(): local_str = local_str.replace(search, replace) local_str = escape(local_str).strip(); return local_str;