Skip to content

Commit 598d2b4

Browse files
ryanerStephen Ryan
authored and
Stephen Ryan
committed
Force quote strings for the facts page - voxpupuli#706
1 parent c0db5ab commit 598d2b4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

puppetboard/views/facts.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ def fact_ajax(env, node, fact, value):
9393
fact_h.node))
9494
if value is None:
9595
if isinstance(fact_h.value, str):
96-
value_for_url = quote_plus(fact_h.value)
96+
# https://github.com/voxpupuli/puppetboard/issues/706
97+
# Force quotes around string values
98+
# This lets plain int values that are stored as strings in the db
99+
# be findable when searched via the facts page
100+
value_for_url = '"' + quote_plus(fact_h.value) + '"'
97101
else:
98102
value_for_url = fact_h.value
99103

0 commit comments

Comments
 (0)