Problem
Anchor button is enabled in CKeditor, but the name attribute is not allowed in WYSIWYG Filter therefore anchor button / function is not working.
Proposed solution
1) Allow the name attribute in WYSIWYG Filter module / input filter. In that case the href attribute shouldn't be marked as required.
It would be helpful to assess whether allowing the name attribute provides a vector for cross site scripting.
2) Remove Anchor button from WYSIWYG CKEditor.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | commons-add-name-attribute-1479294-4.patch | 1.23 KB | izkreny |
| #2 | commons-add-name-attribute-to-wysiwyg-filter-1479294-2.patch | 718 bytes | izkreny |
| #1 | commons-add-name-attribute-to-wysiwyg-filter-1479294-1.patch | 719 bytes | izkreny |
Comments
Comment #1
izkreny commentedAnd here is the patch - my first one via git - hope so everything is A-OK. :)
Comment #2
izkreny commentedBummer, href attribute is required (via exclamation mark), so
<a name="anchor"></a>isn't working even name attribute is allowed..New patch attached.
Comment #3
izkreny commentedSome pieces are missing. :/
I'll add them soon..
Comment #4
izkreny commentedOK, here is the final patch, tested and it's working.
Comment #5
ezra-g commentedThanks for the patches, @mariomaric!
It's generally not customary to mark your own patches as RTBC :). It would be helpful to assess whether allowing the name attribute provides a vector for cross site scripting.
Marking as "needs review."
Comment #6
izkreny commentedOops, sorry for RTBC. :)
Hm..OK, if the name attribute is problematic, we should figure some other way for anchors (id?)..or just throw them out from WYSIWYG profile because people get confused - it's there, but it's not working! :/
Comment #7
linkerbox commentedFYI, the patch did not appear to solve the anchor problem for me. Anchor links still are not working.
Comment #7.0
izkreny commentedUpdating... -- m.m