In some cases Joomla remove when non-semantic-code inside
Joomla 3.7.0dev php 5.5
like this
http://paste.ubuntu.com/23435876/
Insert this code in item (TinyMCE - source code or No Editor), save it.
As result - same code, except tag a, it have been removed
I tested with default text-filters for super-user,
For tinymce can you try to disable the editor checking via the plugin?
The editor text filter i mean
It is disabled already, but it is not relevant, in my case it is the HTML code cleanup feature,
and not the disallowed tag that is causing the removal of the A tag
I tested here
https://www.tinymce.com/
and the tag is also removed, during code cleanup
@volandku
is the problem the removal of the A tag ?
or is the problem something else ?
I found it on client site.
All filters are disabled.
After I downgrade it to 3.6.4 and all works fine
I test it again on new test site.
Cant confirm without TinyMCE, but still confirm with TinyMCE
If it's TinyMCE specific there is either an issue in our implementation or a bug in their code.
Well on first client site there was this bug in any editor (evem without) on 3.7.0
Was no this bug on 3.6.4
May be matters it was upgraded 1.5 -> 2.5 -> 3.4 -> 3.6 -> 3.7
Filters for superadmin was setted to none
The only way it would matter on the upgrade path is if old files were not correctly removed.
If it's TinyMCE specific there is either an issue in our implementation or a bug in their code.
it is tinyMCE issue, and not Joomla implementation,
because I tested here
https://www.tinymce.com/
The a tag is lost , basically tinyMCE tries to move block elements out of the A tag, in this case it fails and removes the A Tag ...
Maybe we should is change the defaults of Joomla plugin for tinyMCE:
to prevent TinyMCE from doing the cleanup:
e.g.
Allowed child elements for a (e.g. notice div and h4):
a[div|h4|span|...........|img|#text]"
1) Report this as an issue to TinyMCE then
2) If it's a configurable behavior, then it might be acceptable. But then I have to ask, should we really allow invalid HTML constructs to be saved? OK the stuff might "work", but doesn't make it right.
2 comments
Explanation:
the block tags are moved outside the anchor during cleanup,
and then you have an A tag without any inner content
thus the A tag is removed
if you add "hello" just after A you will see that the A tag is not lost and it will be around hello
@volandku
I link to an issue above:
you can use
valid_children : '+a[div]',
but there is not parameter in the Joomla content plugin for doing this
Please see this:
http://html5doctor.com/block-level-links-in-html-5/
Wrapping Anchor around block elements is useful,
the alternative is to do tricks and use SPAN and CSS,
but since HTML5 allows, it makes no sense for Joomla not allow it by default
It doesn't matter what links you share to prove it should be ok. If tinyMCE
doesn't allow it (and you said it does not) then there is NOTHING we can do
about it.
I will make a PR (1 line of code),
it is just a matter of our default TinyMCE configuration allowing block elements inside anchor
I have made a PR
we should not promote invalid HTML, if User need it then he/she should do it himself
we should not promote invalid HTML, if User need it then he/she should do it himself
yes agreed but what is invalid the block elements inside anchor are valid (in HTML5)
I have made a PR
Where?
Thanks now I can close this as we have a PR
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-11-13 10:50:43 |
Closed_By | ⇒ | brianteeman |
Can you please a bit more information how to reproduce the issue?