--- a/src/pyams_utils/url.py Sun Jan 14 15:01:29 2018 +0100
+++ b/src/pyams_utils/url.py Tue Jan 16 17:48:46 2018 +0100
@@ -38,6 +38,11 @@
add checks to remove some double slashes, and add control on view name when it begins with a '#'
character which is used by MyAMS.js framework.
"""
+
+ # if we pass a string to absolute_url(), argument is returned as-is!
+ if isinstance(context, str):
+ return context
+
# if we have several parents without name in the lineage, the resource URL contains a double slash
# which generates "NotFound" exceptions; so we replace it with a single slash...
result = resource_url(context, request).replace('//', '/').replace(':/', '://')