Pub Link Fixup Plugin

For non-utf-8 sites, fix up Pub links to use correct encoding.

This plugin performs pub link fixup of the generated HTML page. If Foswiki is configured with a non-utf-8 {Store}{Encoding}, then links to /pub files will be generated with the incorrect encoding.

Even on non-utf-8 sites, Foswiki operates fully with UNICODE and utf-8 encoding in the core and on the web interface. /pub attachment links will be generated assuming the filesnames are utf-8 encoded. This plugin provides a completePageHandler that finds utf-8 encoded links to /pub attachments and re-encodes them to the {Store}{Encoding}.

Enable this plugin to perform the link fixup. It can be safely enabled regardless of the {Store}{Encoding}. If the Plugin detects that the {Store}{Encoding} is utf-8, it quietly disables its completePageHandler.

This is not a complete fix to the issue. It is still strongly recommended that sites convert their Store to utf-8 to avoid these types of encoding issues.


This plugin has one expert setting.
  • {Plugins}{PubLinkFixupPlugin}{Debug}. Enable to record before/after of each rewritten link to the Foswiki debug log.


You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. "Extensions Operation and Maintenance" Tab -> "Install, Update or Remove extensions" Tab. Click the "Search for Extensions" button. Enter part of the extension name or description and press search. Select the desired extension(s) and click install. If an extension is already installed, it will not show up in the search results.

You can also install from the shell by running the extension installer as the web server user: (Be sure to run as the webserver user, not as root!)
cd /path/to/foswiki
perl tools/extension_installer <NameOfExtension> install

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See for more help.


Change History:  
1.00 (14 Sep 2015): Initial version

PackageForm edit

Author GeorgeClark
Version 1.00
Release 14 Sep 2015
Copyright %$CREATEDYEAR%, GeorgeClark, All Rights Reserved
License GPL (GNU General Public License)
ExtensionClassification Data and Files
ExtensionType PluginPackage
Compatibility Foswiki 2.0
IncompatibleWith 1.1.9, 1.1.8, 1.1.7, 1.1.6, 1.1.5, 1.1.4, 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.10, 1.0.9, 1.0.8, 1.0.7, 1.0.6, 1.0.5, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0
DemoUrl http://
SupportUrl PubLinkFixupPlugin
ModificationPolicy FollowsReleaseProcess
I Attachment Action Size Date Who Comment
PubLinkFixupPlugin.md5md5 PubLinkFixupPlugin.md5 manage 177 bytes 28 Mar 2022 - 12:28 MichaelDaum  
PubLinkFixupPlugin.sha1sha1 PubLinkFixupPlugin.sha1 manage 201 bytes 28 Mar 2022 - 12:28 MichaelDaum  
PubLinkFixupPlugin.tgztgz PubLinkFixupPlugin.tgz manage 6 K 28 Mar 2022 - 12:28 MichaelDaum  
PubLinkFixupPlugin.zipzip manage 10 K 28 Mar 2022 - 12:28 MichaelDaum  
PubLinkFixupPlugin_installerEXT PubLinkFixupPlugin_installer manage 4 K 28 Mar 2022 - 12:28 MichaelDaum  
Topic revision: r5 - 28 Mar 2022, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy