microtiny v2.0.3 alters code (cmsms v2.1.2)

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
so what?
Forum Members
Forum Members
Posts: 17
Joined: Thu Nov 27, 2008 3:38 am

microtiny v2.0.3 alters code (cmsms v2.1.2)

Post by so what? »

On a new install of cmsms v2.1.1 updated to v2.1.2 I set up a test page using bootstrap. On one page I copied the code of the bootstrap accordion example into the source code window of microtiny, clicked OK.
In this example there is this tag:

Code: Select all

<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
  Collapsible Group Item #1
</a>
After opening the source code window again, this tag is changed to:

Code: Select all

<a href="#collapseOne" data-toggle="collapse" data-parent="#accordion"> Collapsible Group Item #1 </a>
As anyone can see microtiny removed the attributes role="button", aria-expanded="true" as well as aria-controls="collapseOne" and reordered the other attributes.
Why behaves microtiny like this? Why doesn't leave microtiny the code as it is?
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: microtiny v2.0.3 alters code (cmsms v2.1.2)

Post by paulbaker »

so what? wrote:Why behaves microtiny like this?
I think it regards the HTML it does not recognise as an error and tries to correct it. Annoying, I have come across it myself. >:(

One solution is to change your template so that the HTML code appears outside of a content block.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: microtiny v2.0.3 alters code (cmsms v2.1.2)

Post by Jeff »

TinyMCE (what MicroTiny uses) is what does this be cause it doesn't think that it is valid HTML. Unfortunately there is no way to turn it off without turning of the WYSIWYG completely for that page.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: microtiny v2.0.3 alters code (cmsms v2.1.2)

Post by Dr.CSS »

You may want to try tinyMCE and see if it has a HTML5 setting to allow that type of code...
Post Reply

Return to “CMSMS Core”