租房小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
2.0 KiB

6 months ago
  1. # Changelog
  2. #### Version 2.2.0
  3. * Initial support for XML comments ([#47](https://github.com/davidcalhoun/jstoxml/issues/47))
  4. #### Version 2.1.1
  5. * Fix for [#48](https://github.com/davidcalhoun/jstoxml/issues/48) (various 0-depth issues, bad "is output start" logic)
  6. #### Version 2.0.0 (breaking)
  7. - New: automatic entity escaping for `&`, `<`, and `>` characters. In addition, quotes `"` in attributes are also escaped (see [#41](/../../issues/41)). Prior to this, users [had to provide their own filter manually](https://github.com/davidcalhoun/jstoxml/issues/4#issuecomment-19165730). Note that `jstoxml` makes an effort not to escape entities that appear to have already been encoded, to prevent double-encoding issues.
  8. - E.g. `toXML({ foo: '1 < 2 & 2 > 1' }); // -> "<foo>1 &lt; 2 &amp; 2 &gt; 1</foo>"`
  9. - To restore the default behavior from `v1.x.x`, simply pass in `false` to `filter` and `attributesFilter` options:
  10. `toXML({ foo: '1 < 2 & 2 > 1' }, { filter: false, attributesFilter: false }); // -> "<foo>1 < 2 & 2 > 1</foo>"`
  11. #### Version 1.6.9
  12. - fix for [#40](https://github.com/davidcalhoun/jstoxml/issues/47). Previously top-level objects and arrays were concatenated without proper line breaks.
  13. #### Version 1.4.2
  14. - support for handling arrays of primitives, instead of simply concatenating [#33](/../../issues/33)
  15. #### Version 1.3.0
  16. - restored `default` module export [#31](/../../issues/31)
  17. #### Version 1.2.0
  18. - refactoring and cleanup
  19. #### Version 1.1.0
  20. - Added support for attribute filtering (see Example 11b below).
  21. #### Version 1.0.0
  22. - Complete rewrite! The code should now be easier to understand and maintain.
  23. - now supports emoji/UTF8 tag attributes (needed for AMP pages - e.g. `<html ⚡ lang="en">`) (see example 14)
  24. - now supports duplicate attribute key names (see example 15)
  25. - Fixed: functions returning objects now have now that output passed through toXML for XML conversion
  26. - Fixed: empty text strings now properly output self-closing tags
  27. - Migrated tests to mocha