Details
Description
While it's not usual, it's possible to have some nested "ignoretags" in filters, so something like:
<a href="url">whatever<span class="nolink">text</span></a> (with nested <a> and "nolink" ignoretags)
is transformed to:
<p><a href="url">whatever<#1-%-0#></a></p
This is caused by filterlib, trying to rebuild ignoretags in the SAME order they were found. By simply reversing the array of ignoretags, rebuild order is correct and we get the original string ok.
Attached one example of the problem in moodle.org forums