I have an HTML block on the /my/index.php page of a site. It is being used by the client to link to various courses and course search topics for their students to quickly find relevant courses; they are routinely editing it to keep it up to date with their current curricula.
Recently on transitioning the site to a new moodle and php version, suddenly some elements are being completely removed when displayed for users that aren't site-admins. I've confirmed that the elements are being saved and exist, but when displayed they just aren't there. I have put as much relevant info below as possible. My apologies for the state of the code; I have swapped the urls and link text, everything else is as-is.
"DEV"(Working for users and site admins)
Moodle: 3.5.4 (Build: 20190114)
PHP: 7.2.14
Theme: Impressions (2017111300)
"LIVE" (Working for site admins only)
Moodle: 3.5.6+ (Build: 20190614)
PHP: 7.2.19
Theme: Impressions (2017111300)
Site admin inspect result:
[
<h4><b>Online Courses<br></b></h4>
<ul class="list-group"><a href="https://my_website/course/search.php?search=Some+Search+Terms">
</a><li class="list-group-item"><a href="https://my_website/course/search.php?search=Some+Search+Terms">Some Search Terms</a><br></li><a href="http://blank">
</a><li class="list-group-item"><a href="https://my_website/course/view.php?id=173">This Course Name</a><br></li><a href="http://blank">
</a><li class="list-group-item"><a href="https://my_website/course/view.php?id=329"><span><span>This Course Name<br></span></span></a></li><a href="http://blank">
</a><li class="list-group-item"><a href="https://my_website/course/view.php?id=327"><span><span>This Course Name</span></span></a><a href="http://blank"><span><span><br></span></span></a></li></ul>
]
Any other user inspect result:
[
<h4><b>Online Courses<br></b></h4>
<a href="https://my_website/course/search.php?search=Some+Search+Terms">
</a>
<a href="https://my_website/course/search.php?search=Some+Search+Terms">Some Search Terms</a>
<br>
<a href="http://blank">
</a>
<a href="https://my_website/course/view.php?id=173">This Course Name</a>
<br>
<a href="http://blank">
</a>
<a href="https://my_website/course/view.php?id=329"><span><span>This Course Name<br></span></span></a>
<a href="https://my_website/course/view.php?id=327"><span><span>This Course Name</span></span></a>
<a href="http://blank"><span><span><br></span></span></a>
]
As you may notice, the ul and li tags are just gone. I tried looking through the code and changed the theme just in case, but no such luck. At this point I don't know if it's a bug or I've developed tunnel vision and can't see something obvious.
I recently had this issue with a form tag being stripped, but was able to write my own block rather than using the HTML block. But, due to the user's routine editing of this block's content, I would rather use the already working HTML block instead of writing my own to do the same thing; and possibly encountering the same issue.
Thanks in advance.