<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://hg.omfa.de/prosody-hg/</link>
    <language>en-us</language>

    <title>prosody-hg: spec/util_format_spec.lua history</title>
    <description>spec/util_format_spec.lua revision history</description>
    <item>
    <title>util.format: Handle Lua 5.5 change in precision tostring(big number)</title>
    <link>http://hg.omfa.de/prosody-hg/log/1914675b6727/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Handle Lua 5.5 change in precision tostring(big number)<br/>
<br/>
sed -i '/73786976294838206464/s/equal(&quot;\[7\.3786976294838e+19]&quot;/matches(&quot;%[7%.3786976294838%d*e%+19%]&quot;/'<br/>
sed -i '/73786976294838206464/s/equal(&quot;7\.3786976294838e+19&quot;/matches(&quot;7%.3786976294838%d*e%+19&quot;/'<br/>
<br/>
Don't think this change in Lua affects anything else, we shouldn't be<br/>
depending on the exact number format tostring() uses.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 08 Aug 2025 15:04:48 +0200</pubDate>
</item>
<item>
    <title>util.format: Update tests for serialization changes</title>
    <link>http://hg.omfa.de/prosody-hg/log/c0e3e0d79574/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Update tests for serialization changes]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 26 Mar 2023 00:49:25 +0100</pubDate>
</item>
<item>
    <title>tests: Remove special-casing of Lua 5.1</title>
    <link>http://hg.omfa.de/prosody-hg/log/c4337ff4f1c4/spec/util_format_spec.lua</link>
    <description><![CDATA[tests: Remove special-casing of Lua 5.1<br/>
<br/>
Part of #1600]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sat, 02 Jul 2022 17:29:03 +0200</pubDate>
</item>
<item>
    <title>util.format: Skip control code escaping when doing full serialization</title>
    <link>http://hg.omfa.de/prosody-hg/log/25b853e64d83/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Skip control code escaping when doing full serialization<br/>
<br/>
Fixes that a multi-line string ended up &quot;like\<br/>
\9this&quot; instead of &quot;like\nthis&quot; as can be demonstrated by somehow<br/>
initiating a connection to a HTTP server.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Thu, 27 Jan 2022 21:14:22 +0100</pubDate>
</item>
<item>
    <title>util.format: Ensure metatable __tostring results are also sanitized</title>
    <link>http://hg.omfa.de/prosody-hg/log/e0a8c5b1ab4f/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Ensure metatable __tostring results are also sanitized]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Mon, 13 Dec 2021 16:34:55 +0100</pubDate>
</item>
<item>
    <title>util.format: Fix some formats expecting positive numbers in Lua 5.2</title>
    <link>http://hg.omfa.de/prosody-hg/log/2ce06f788093/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Fix some formats expecting positive numbers in Lua 5.2<br/>
<br/>
Amazing how string.format behaves differently under each Lua version]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sat, 11 Dec 2021 20:54:37 +0100</pubDate>
</item>
<item>
    <title>util.format: ALL THE TESTS!!!</title>
    <link>http://hg.omfa.de/prosody-hg/log/ee94ac51b2dd/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: ALL THE TESTS!!!<br/>
<br/>
The more tests I made, the more Lua 5.1 quirks I discovered.<br/>
<br/>
Tests generated using a tool plus some touch-up.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sat, 11 Dec 2021 20:38:54 +0100</pubDate>
</item>
<item>
    <title>util.format: Also handle the %p format added in Lua 5.4</title>
    <link>http://hg.omfa.de/prosody-hg/log/161f8268c4b3/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Also handle the %p format added in Lua 5.4]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sat, 11 Dec 2021 13:39:58 +0100</pubDate>
</item>
<item>
    <title>util.format: Ensure sanitation of strings passed to wrong format</title>
    <link>http://hg.omfa.de/prosody-hg/log/3db09eb4c43b/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Ensure sanitation of strings passed to wrong format<br/>
<br/>
Ie. log(&quot;debug&quot;, &quot;%d&quot;, &quot;\1\2\3&quot;) should not result in garbage.<br/>
<br/>
Also optimizing for the common case of ASCII string passed to %s and<br/>
early returns everywhere.<br/>
<br/>
Returning nil from a gsub callback keeps the original substring.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sat, 11 Dec 2021 13:30:34 +0100</pubDate>
</item>
<item>
    <title>util.format: Escape invalid UTF-8 by passing trough serialization</title>
    <link>http://hg.omfa.de/prosody-hg/log/87bc26f23d9b/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Escape invalid UTF-8 by passing trough serialization<br/>
<br/>
Should prevent invalid UTF-8 from making it into the logs, which can<br/>
cause trouble with terminals or log viewers or other tools, such as when<br/>
grep determines that log files are binary.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 10 Dec 2021 22:48:45 +0100</pubDate>
</item>
<item>
    <title>util.format: Change formatting of nil values to avoid looking like XML</title>
    <link>http://hg.omfa.de/prosody-hg/log/fc1b8fe94d04/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Change formatting of nil values to avoid looking like XML]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Tue, 29 Jun 2021 16:18:31 +0200</pubDate>
</item>
<item>
    <title>util.format: Escape ASCII control characters in output</title>
    <link>http://hg.omfa.de/prosody-hg/log/5f4a657136bc/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Escape ASCII control characters in output<br/>
<br/>
This should offer some protection against doing evil things to<br/>
terminals. Doesn't protect against pure broken UTF-8 garbage however.<br/>
<br/>
See #734]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Tue, 15 Jun 2021 23:24:23 +0200</pubDate>
</item>
<item>
    <title>util.format: Handle integer formats the same way on Lua versions without integer support</title>
    <link>http://hg.omfa.de/prosody-hg/log/386f085820e6/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Handle integer formats the same way on Lua versions without integer support]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Thu, 30 May 2019 13:54:11 +0200</pubDate>
</item>
<item>
    <title>util.format: Handle formats expecting an integer in Lua 5.3+ (fixes #1371)</title>
    <link>http://hg.omfa.de/prosody-hg/log/4fca92d60040/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Handle formats expecting an integer in Lua 5.3+ (fixes #1371)]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Thu, 30 May 2019 13:41:05 +0200</pubDate>
</item>
<item>
    <title>util.format: Serialize values for the %q format</title>
    <link>http://hg.omfa.de/prosody-hg/log/6ed0d6224d64/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Serialize values for the %q format<br/>
<br/>
Improves eg debug logs]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 12 Oct 2018 01:29:34 +0200</pubDate>
</item>
<item>
    <title>util.format: Tweak how nil values are handled</title>
    <link>http://hg.omfa.de/prosody-hg/log/3da6cc927ee6/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Tweak how nil values are handled<br/>
<br/>
Because [&lt;nil&gt;] seems exsessive]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 28 Nov 2018 20:36:53 +0100</pubDate>
</item>
<item>
    <title>util.format: Add test coverage for case of extra nil argument</title>
    <link>http://hg.omfa.de/prosody-hg/log/84b73949fc30/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Add test coverage for case of extra nil argument]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sat, 17 Mar 2018 19:47:48 +0100</pubDate>
</item>
<item>
    <title>util.format: Fix tests to have expected value first</title>
    <link>http://hg.omfa.de/prosody-hg/log/b96b0141cb61/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Fix tests to have expected value first]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sat, 17 Mar 2018 19:43:20 +0100</pubDate>
</item>
<item>
    <title>util.format: Move tests to spec/</title>
    <link>http://hg.omfa.de/prosody-hg/log/d967d6f2ad00/spec/util_format_spec.lua</link>
    <description><![CDATA[util.format: Move tests to spec/]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 10 Nov 2017 05:46:39 +0100</pubDate>
</item>

  </channel>
</rss>
