Jump to content

Search the Community

Showing results for tags 'multiline'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting


  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL




Found 2 results

  1. As of Alfred 2.0.3, it seems that passing multi-line text out from a script filter via the arg attribute (e.g., to the copy-to-clipboard action) is not supported: each newline is replaced with a space. I suspect this is a side effect of XML parsing, since the desired output value is stored in an XML attribute, and even though newlines are legal in attribute values, on passing the value out, XML parsers are expected to normalize the value by replacing all non-space whitespace characters with a space each, including \n (and \r\n) - see http://www.w3.org/TR/1998/REC-xml-19980210#AVNormalize Woul
  2. The `arg` part of a script filter's result (the bit passed on as {query}) is oddly an XML attribute instead of an element. This makes it harder to pass on newlines in results--they just turn into spaces. The trick is to escape the newlines as an entity reference like: Most XML escape functions won't do that automatically, so you probably need to it yourself. Possibly double-quotes too. The best thing I came up with in Python is: from xml.sax.saxutils import escape safe_arg = escape(any_crazy_text, {'"': '"', '\n': ' '} ) I'd be happy to hear that there's a simpler way. J
  • Create New...