Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_escape_silent(self):
assert escape_silent(None) == Markup()
assert escape(None) == Markup(None)
assert escape_silent('') == Markup(u'<foo>')
def test_escape_silent(self):
assert escape_silent(None) == Markup()
assert escape(None) == Markup(None)
assert escape_silent('') == Markup(u'<foo>')
def test_escape_silent(self):
assert escape_silent(None) == Markup()
assert escape(None) == Markup(None)
assert escape_silent('') == Markup(u'<foo>')
def test_escape_silent(self):
assert escape_silent(None) == Markup()
assert escape(None) == Markup(None)
assert escape_silent('') == Markup(u'<foo>')
def test_escape_silent(self):
assert escape_silent(None) == Markup()
assert escape(None) == Markup(None)
assert escape_silent('') == Markup(u'<foo>')
def test_escape_silent(self):
assert escape_silent(None) == Markup()
assert escape(None) == Markup(None)
assert escape_silent('') == Markup(u'<foo>')
def test_escape_silent(self):
assert escape_silent(None) == Markup()
assert escape(None) == Markup(None)
assert escape_silent('') == Markup(u'<foo>')
missing=0),
"limit": fields.Int(required=False,
validate=lambda lim: lim >= 1 and lim <= 100,
missing=QUERY_LIMIT),
"order_by": fields.Str(required=False,
missing="?")
}
(primary, secondary) = validate_models(self)
query_data = validate_input(__validation_rules__, request)
skip = query_data.get("skip")
limit = query_data.get("skip") + query_data.get("limit")
order_by = escape(query_data.get("order_by"))
if order_by:
if order_by.startswith("-"):
# select property for descending ordering
order_by_prop = order_by[1:]
else:
# select property for ascending ordering
order_by_prop = order_by
primary_model_props = primary.model.defined_properties().keys()
if all([order_by_prop not in primary_model_props,
order_by_prop != "?"]):
raise HTTPException(msg.INVALID_ORDER_PROPERTY, 404)
total_items = len(primary.model.nodes)
def _make_tag(template, text, **attrs):
return Markup(template % (_format_attrs(**attrs), escape(text)))
def _get_message(self, payload):
msg = payload.get('message','')
if self.allow_html is False:
msg = escape(msg)
return msg