internal package
Foswiki::Plugins::PubLinkFixupPlugin internal package
Foswiki::Plugins::PubLinkFixupPlugin {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}.
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.$topic
- the name of the topic in the current CGI query
$web
- the name of the web in the current CGI query
$user
- the login name of the user
$installWeb
- the name of the web the plugin topic is in (usually the same as $Foswiki::cfg{SystemWebName}
)
$html
- the body of the page (normally <html>..$lt;/html>)
$httpHeaders
- the HTTP headers. Note that the headers do not contain a Content-length
. That will be computed and added immediately before the page is actually written. This is a string, which must end in \n\n.
This routine is called for each pub link found in the complete page. It takes the href/src location from the link, re-encodes it into the {Store}{Encoding} and then replaces it back into the whole link.