External links icon and target _blank is disappearing on subsequent wysiwyg save
- Status
- Pending
- Subject
- External links icon and target _blank is disappearing on subsequent wysiwyg save
- Version
- 6.x
- Feature
- WYSIWYG (What You See is What You Get)
- Submitted by
- Nelson Ko
- Lastmod by
- Nelson Ko
- Rating
- Description
- external links are being "cleaned up" on subsequent changes in the wysiwyg (when I first save I get the external link icon and target _blank but when I reload the article in the editor, the icon is gone, and also target=_blank).
- Solution
fix in r30331 with check for pref popupLinks feature or wysiwyg before doing the below fix.
Modifying function in lib/htmlpurifier_tiki/HTMLPurifier.tiki.php according to example in http://htmlpurifier.org/docs/enduser-customize.html seems to do the trick, but not sure if this is the best fix. After all , HTML strict does not allow target attribute. o maybe some js approach is better...
Copy to clipboardfunction getHTMLPurifierTikiConfig() { global $tikipath; $d = $tikipath.'temp/cache/HTMLPurifierCache'; if (!is_dir($d)) { if (!mkdir($d)) { $d = $tikipath.'temp/cache'; } } $conf = HTMLPurifier_Config::createDefault(); $conf->set('Cache.SerializerPath', $d); // CUSTOM add exceptions $conf->set('HTML.DefinitionID', 'allow target'); $config->set('HTML.DefinitionRev', 1); $def = $conf->getHTMLDefinition(true); $def->addAttribute('a', 'target', 'Enum#_blank,_self,_target,_top'); return $conf; }- Importance
- 8
- Priority
- 40
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 3597
- Created
- Wednesday 20 October, 2010 14:11:19 UTC
by Nelson Ko - LastModif
- Wednesday 27 October, 2010 00:33:24 UTC