ESPAsyncwebserver template processor bug - size related?

I have a bug on the /system/ page, I also noticed it on /wifi/ page sometimes, not reproducable everytime. So i am glad, the bug also appears here 100% reproducable

I inserted `<li><a class='' href='/system/sensor/'>&#x1F321;&#xFE0F; Sensor configuration</a></li>` to the /system/ html template. With this included, the template processor will corrupt the final output when processing %FOOTER%, which got inserted from AddHeaderFooter() function.

the rendered output, damaged, looks like this

```
<input type='submit' value='&#x1F4BE; Save settings'>
</form>
<div cla%</span></div>
</div></body></html>
```

notice that the div on the second last line is broken at `class` - got `<div cla%</span></div>`.

It should look like this: 

```
<input type='submit' value='&#x1F4BE; Save settings'>
</form>
<div class='footer'><span>Build: 92724fa-esp8266-20241102171544</span></div>
</div></body></html>
```
This commit is contained in:
DeltaLima 2024-11-02 17:31:51 +01:00
parent 92724fa1f4
commit 84c4840993

View file

@ -54,6 +54,7 @@ const char* Page_system_HTML PROGMEM = R"(%HEADER%
%FOOTER%)"; %FOOTER%)";
const char* Page_system_HTML_SUBNAV PROGMEM = R"(<ul class='subnav'> const char* Page_system_HTML_SUBNAV PROGMEM = R"(<ul class='subnav'>
<li><a class='' href='/system/sensor/'>&#x1F321;&#xFE0F; Sensor configuration</a></li>
<li><a class='%ACTIVE_SUBNAV_OUTPUT%' href='/system/output/'>&#9889; Output configuration</a></li> <li><a class='%ACTIVE_SUBNAV_OUTPUT%' href='/system/output/'>&#9889; Output configuration</a></li>
<li><a class='%ACTIVE_SUBNAV_UPDATE%' href='/system/update'>&#x1F504; Firmware update</a></li> <li><a class='%ACTIVE_SUBNAV_UPDATE%' href='/system/update'>&#x1F504; Firmware update</a></li>
<li><a class='%ACTIVE_SUBNAV_RESTART%' href='/system/restart' >&#x1F501; CanGrow restart</a></li> <li><a class='%ACTIVE_SUBNAV_RESTART%' href='/system/restart' >&#x1F501; CanGrow restart</a></li>