HTML automatically being removed/simplified?

HTML automatically being removed/simplified?

by Andrew Stewart -
Number of replies: 1

Hiya, having a very odd issue with the html editor (running Moodle 2.5, Essential theme)

I have a set of icons which I want to change when hovered over with the mouse, this works well in the 'marketing spots' section of Essential, but when doing something similar in a course description some parts of the code are being removed (almost as if it's trying to simplify it).

This is what I'm putting:

<table border="0" cellpadding="2" align="center" style="width: 100%;">
<tbody>
<tr>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/notices.png" onmouseover="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/notices2.png'" onmouseout="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/notices.png'" style="width: 100%;" /></a></td>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/homework.png" onmouseover="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/homework2.png'" onmouseout="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/homework.png'" style="width: 100%;" /></a></td>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/hap.png" onmouseover="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/hap2.png'" onmouseout="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/hap.png'" style="width: 100%;" /></a></td>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/plp.png" onmouseover="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/plp2.png'" onmouseout="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/plp.png'" style="width: 100%;" /></a></td>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/vi.png" onmouseover="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/vi2.png'" onmouseout="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/vi.png'" style="width: 100%;" /></a></td>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/library.png" onmouseover="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/library2.png'" onmouseout="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/library.png'" style="width: 100%;" /></a></td>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/trips.png" onmouseover="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/trips2.png'" onmouseout="this.src='http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/trips.png'" style="width: 100%;" /></a></td>
</tr>
</tbody>
</table>

 

I save changes and it works fine, and all hovers and links work.
However when I go back in to edit the code (change pictures, links) it changes itself to:

 

<table style="width: 100%;" border="0" cellpadding="2" align="center">
<tbody>
<tr>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/notices.png" alt="" /></a></td>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/homework.png" alt="" /></a></td>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/hap.png" alt="" /></a></td>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/plp.png" alt="" /></a></td>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/vi.png" alt="" /></a></td>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/library.png" alt="" /></a></td>
<td style="width: 14%;" colspan="1"><a href="http://www.google.com"><img src="http://moodle2.southwirral.wirral.sch.uk/theme/essential/images/trips.png" alt="" /></a></td>
</tr>
</tbody>
</table>

 

Am I coding this wrong? Is there an option I need to change in the settings?

 

Average of ratings: -
In reply to Andrew Stewart

Re: HTML automatically being removed/simplified?

by Vani Bheemreddy -

hi


I have the same issue, did you find a solution yet?


Thanks.