Fullscreen
Loading...
 
Skip to main content

WYSIWYG_6x - Anchor flag not saving

Status
Closed
Subject
WYSIWYG_6x - Anchor flag not saving
Version
6.x
Category
  • Consistency
  • Regression
  • Usability
Feature
Toolbars, Quicktags and Smileys
Wiki Plugin (extends basic syntax)
Wiki Syntax (text area, parser, external wiki, etc)
WYSIWYG (What You See is What You Get)
Resolution status
Fixed or Solved
Submitted by
tpinet
Lastmod by
Ushindi Gedeon
Rating
(0)
Description

We are running Tiki 6.2 (clean install), on a Windows 2003 Server, Apache 2.2.16 w SSL, PHP 5.3.3, remote MySQL 5 database.

This bug is across all browsers.

Our users are editing in the CKEditor WYSIWYG and trying to add anchors. When using the WYSIWYG_6x default profile of:
Copy to clipboard
Editing and Plugins Wiki Paragraph formatting (ON, however default: off) ...but still create line breaks within paragraphs (on) HTML Purifier (on) Wiki Allow HTML (on, however default: off) WYSIWYG Content is parsed like wiki page (on) Content is partially wiki parsed (off) Use Wiki syntax in WYSIWYG (off)

our users use the Anchor icon (flag) to create an anchor at the bottom of a page. The anchor name window comes up and they give it a name, save, a yellow anchor icon is displayed in the editor. If they jump to the top of the page and create a Link (using the Link icon in the toolbar) and select Link Type: "Link to another anchor in the text", Select an Anchor/By Anchor Name and press Ok. At this point everything looks correct in CKEditor.The user presses Save. The Link at the top is correct using the normal syntax
Copy to clipboard
[#myAnchor|Link to bottom]

however the anchor at the bottom is gone as if it never saved or the parser has discarded it.


I have had to instruct our users how to type in manually the anchors using the old plugins http://doc.tiki.org/PluginAlinkQuestion and http://doc.tiki.org/PluginAnameQuestion. They are not happy about using long hand plugin notation.

I have tried in both IE 8 and FF 3.6 with the same result.

Since IE is our corp standard our users need to be able to add anchors using that browser. Also, they had no problem in Tiki 5.x but that was a different WYSIWYG system.

May be related to http://dev.tiki.org/tiki-view_tracker_item.php?itemId=1499Question

Solution

This is the fix but needs to be made optional becasuse allowing IDs is a potential security/integrity problem. See http://htmlpurifier.org/live/configdoc/plain.html#Attr.EnableIDQuestion for more information.

Copy to clipboard
Index: HTMLPurifier.tiki.php =================================================================== --- HTMLPurifier.tiki.php (revision 34555) +++ HTMLPurifier.tiki.php (working copy) @@ -48,8 +48,12 @@ if ($prefs['feature_wysiwyg'] == 'y' || $prefs['popupLinks'] == 'y') { $conf->set('HTML.DefinitionID', 'allow target'); $conf->set('HTML.DefinitionRev', 1); + $conf->set('Attr.EnableID', 1); $def = $conf->getHTMLDefinition(true); $def->addAttribute('a', 'target', 'Enum#_blank,_self,_target,_top'); + $def->addAttribute('a', 'name', 'CDATA'); + + } return $conf; }
Workaround
If I turn Editing and Plugins > HTML Purifier OFF (default: is on) then anchors work. This means to me that the WYSIWYG is inserting bad HTML on save for anchors and the HTML Purifier is stripping it out. This is not ideal however.
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
3828
Created
Monday 21 March, 2011 15:52:07 UTC
by tpinet
LastModif
Tuesday 30 June, 2026 15:59:06 UTC


Show PHP error messages