Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | util.stanza: Move misplaced argument to correct place | Kim Alvefur | 2020-12-24 | 1 | -2/+2 |
| | | | | | valid_utf8() takes only one argument, so the false was probably meant to be valid_xml_cdata(text, attribute=false) | ||||
* | util.stanza: Reject ASCII control characters (fixes #1606) | Kim Alvefur | 2020-11-11 | 1 | -1/+9 |
| | |||||
* | util.stanza: Deserialize stanza without mutating input (fixes #711) | Kim Alvefur | 2018-12-01 | 1 | -27/+17 |
| | |||||
* | util.stanza: Validate input to clone() (with brief tests) | Kim Alvefur | 2018-11-17 | 1 | -2/+9 |
| | |||||
* | util.stanza: Set preserialize as freeze metamethod | Kim Alvefur | 2018-10-12 | 1 | -0/+2 |
| | |||||
* | util.stanza: Don't automatically generate ids for iq stanzas | Matthew Wild | 2018-09-13 | 1 | -9/+4 |
| | | | | | | | | | | Users of this API should provide their own id attribute that meets their uniqueness requirements. The current implementation leaks information (i.e. how many iq stanzas have been sent by the server to other JIDs). Providing any strong guarantees of randomness here would need to pull in additional dependencies that we don't want in this simple library. | ||||
* | util.stanza + tests: Bail out of loop if we are iterating too far, fixes #981 | Matthew Wild | 2018-08-19 | 1 | -0/+6 |
| | |||||
* | Merge 0.10->trunk | Kim Alvefur | 2018-07-08 | 1 | -0/+10 |
|\ | |||||
| * | util.stanza: Add method for removing all children with a specific name, xmlns | Kim Alvefur | 2018-07-08 | 1 | -0/+10 |
| | | |||||
* | | util.stanza: Remove redundant check from :text now done in :add_direct_child | Kim Alvefur | 2018-06-08 | 1 | -1/+0 |
| | | |||||
* | | util.stanza: Verify that other objects added as children are valid strings | Kim Alvefur | 2018-06-08 | 1 | -1/+4 |
| | | |||||
* | | util.stanza: Verify that child tags added are really stanzas (closes #1165) | Kim Alvefur | 2018-06-08 | 1 | -1/+1 |
| | | |||||
* | | util.stanza: Add :text_tag(), a shortcut for adding nodes with text | Kim Alvefur | 2018-03-21 | 1 | -0/+4 |
| | | |||||
* | | util.stanza: Allow :text(nil) and :text("") as harmless nops | Matthew Wild | 2018-03-21 | 1 | -3/+5 |
| | | |||||
* | | util.stanza: Switch from asserts to if's, improve performance, errors and tests | Matthew Wild | 2018-03-18 | 1 | -18/+32 |
| | | |||||
* | | util.stanza: Add stricter validation for data passed to stanza builder API | Matthew Wild | 2018-03-16 | 1 | -0/+29 |
| | | |||||
* | | vairious: Add annotation when an empty environment is set [luacheck] | Kim Alvefur | 2018-02-28 | 1 | -0/+1 |
| | | |||||
* | | util.stanza: Change __type to __name as this is used by Lua 5.3 in some ↵ | Kim Alvefur | 2018-02-16 | 1 | -1/+1 |
| | | | | | | | | error reporting functions | ||||
* | | util: Various minor changes to please [luacheck] | Kim Alvefur | 2017-11-10 | 1 | -1/+7 |
| | | |||||
* | | Merge 0.10->trunk | Kim Alvefur | 2016-12-02 | 1 | -0/+6 |
|\| | |||||
| * | util.stanza: Add an is_stanza() function to check if an object is a stanza | Kim Alvefur | 2016-11-28 | 1 | -0/+6 |
| | | |||||
* | | Merge 0.10->trunk | Matthew Wild | 2016-03-09 | 1 | -21/+20 |
|\| | |||||
| * | util.stanza: Some code cleanup [luacheck] | Matthew Wild | 2016-03-09 | 1 | -21/+20 |
| | | |||||
* | | util.stanza, util.xml, util.xmppstream: Add support for tracking defined ↵ | Matthew Wild | 2015-12-08 | 1 | -5/+10 |
|/ | | | | namespaces and their prefix (stanza.namespaces), knowing/preserving prefix names is required for some applications (thanks daurnimator) | ||||
* | util.stanza: Export xml_escape (missed during removal of module() calls) | Kim Alvefur | 2015-09-03 | 1 | -0/+1 |
| | |||||
* | util.*: Remove use of module() function, make all module functions local and ↵ | Kim Alvefur | 2015-02-21 | 1 | -36/+38 |
| | | | | return them in a table at the end | ||||
* | Merge 0.9->0.10 | Kim Alvefur | 2014-10-26 | 1 | -13/+2 |
|\ | |||||
| * | Backout changeset 6e67c73f730c: not a major fix and it breaks interop with ↵ | Matthew Wild | 2014-10-24 | 1 | -13/+2 |
| | | | | | | | | at least Isode M-Link, and possibly standards, while it's not clear it actually fixes the original problem either. | ||||
* | | Merge 0.9->0.10 | Waqas Hussain | 2014-10-08 | 1 | -2/+13 |
|\| | |||||
| * | util.stanza: Escape newlines and tabs (\r\n\t) when serializing stanzas. ↵ | Waqas Hussain | 2014-10-08 | 1 | -2/+13 |
| | | | | | | | | \r\n transforms into \n otherwise, and \r\n\t in attributes transforms into spaces. | ||||
* | | Remove all trailing whitespace | Florian Zeitz | 2013-08-09 | 1 | -8/+8 |
|/ | |||||
* | util.stanza: Use correct index when replacing the tag in .tags (thanks ↵ | Matthew Wild | 2013-04-05 | 1 | -1/+1 |
| | | | | daurnimator) | ||||
* | util.stanza: Add stanza:find(), a light weight XPath-like method | Kim Alvefur | 2013-04-04 | 1 | -0/+26 |
| | |||||
* | util.stanza: :maptags(): Fixes to make loop more robust on item removal | Matthew Wild | 2013-04-03 | 1 | -2/+4 |
| | |||||
* | util.stanza: Use ipairs instead of childtags (behavior changed in 92c86e11fd44) | Kim Alvefur | 2012-08-21 | 1 | -1/+1 |
| | |||||
* | util.stanza: Make stanza:childtags() behave like :get_child() | Kim Alvefur | 2012-07-05 | 1 | -2/+2 |
| | |||||
* | util.stanza: Remove unused function imports | Matthew Wild | 2012-04-28 | 1 | -6/+0 |
| | |||||
* | util.stanza: Remove unused __add metamethod | Matthew Wild | 2011-12-21 | 1 | -5/+0 |
| | |||||
* | util.stanza: Remove childtags and rename matching_tags -> childtags (they ↵ | Matthew Wild | 2011-02-22 | 1 | -18/+9 |
| | | | | are API-compatible) | ||||
* | util.stanza: Rewrite clone() to be more optimized. | Waqas Hussain | 2011-02-20 | 1 | -15/+12 |
| | |||||
* | util.stanza: Make some globals local, so they don't clutter the global ↵ | Waqas Hussain | 2011-02-03 | 1 | -0/+2 |
| | | | | checking script's output. It's also a minor optimization ;) | ||||
* | util.stanza: Add get_child_text() method to get the text of the specified ↵ | Matthew Wild | 2011-01-31 | 1 | -0/+8 |
| | | | | child element (get_child() + get_text() rolled into one step) | ||||
* | util.stanza: Iterate on childtags instead of all childs. | Kim Alvefur | 2010-12-17 | 1 | -1/+1 |
| | |||||
* | util.stanza: Change get_error() to return nil rather than '' for no text | Matthew Wild | 2010-12-11 | 1 | -1/+1 |
| | |||||
* | util.stanza, util.xmppstream, core.xmlhandlers: Allow stanza.last_add to be ↵ | Waqas Hussain | 2010-11-26 | 1 | -13/+12 |
| | | | | nil, and set it nil by default. Saves a table allocation per-element. 20% faster stanza building. | ||||
* | util.stanza: Make the current element <message> instead of <body> when body ↵ | Waqas Hussain | 2010-09-21 | 1 | -1/+1 |
| | | | | text is passed to st.message(). | ||||
* | util.stanza: stanza:matched_children() -> stanza:matching_tags() | Matthew Wild | 2010-08-30 | 1 | -1/+1 |
| | |||||
* | util.stanza: Add stanza:maptags() to apply a function over child tags ↵ | Matthew Wild | 2010-08-30 | 1 | -0/+24 |
| | | | | (return nil to remove tag from stanza) | ||||
* | util.stanza: Optimisation, remove useless if...then in stanza:children() ↵ | Matthew Wild | 2010-08-29 | 1 | -2/+1 |
| | | | | iterator | ||||
* | util.stanza: Add stanza:matched_children(name, xmlns) [name suggestions welcome] | Matthew Wild | 2010-08-29 | 1 | -0/+17 |
| |