wrapper for smart_urlquote, issue #1386