Skip to content

Commit

Permalink
popover unicode fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jpylephilalegal committed Feb 8, 2017
1 parent c38eec7 commit 3772320
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docassemble_base/docassemble/base/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,8 @@ def my_escape(result):
return(result)

def noquote(string):
return json.dumps(string.replace('\n', ' ').rstrip())
#return json.dumps(string.replace('\n', ' ').rstrip())
return '"' + string.replace('\n', ' ').replace('"', '"').rstrip() + '"'

def add_terms(termname, terms):
#logmessage("add terms with " + termname + "\n")
Expand Down
2 changes: 1 addition & 1 deletion docassemble_base/docassemble/base/standardformatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ def as_html(status, url_for, debug, root, validation_rules):
if field.datatype == 'object_checkboxes':
datatypes[safeid(from_safeid(field.saveas) + ".gathered")] = 'boolean'
if field.number in status.helptexts:
helptext_start = '<a class="daterm" data-container="body" data-toggle="popover" data-placement="bottom" data-content=' + noquote(unicode(status.helptexts[field.number])) + '>'
helptext_start = '<a class="daterm" data-container="body" data-toggle="popover" data-placement="bottom" data-content=' + noquote(status.helptexts[field.number]) + '>'
helptext_end = '</a>'
else:
helptext_start = ''
Expand Down

0 comments on commit 3772320

Please sign in to comment.