diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 3a32e147e5af..1c4152fb9936 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -912,10 +912,13 @@ bool rewriteFlatpakHelpRootUrl(OUString * helpRootUrl) { } +// add <noscript> meta for browsers without javascript + #define SHTML1 "<!DOCTYPE HTML><html lang=\"en-US\"><head><meta charset=\"UTF-8\">" -#define SHTML2 "<meta http-equiv=\"refresh\" content=\"1; url='" -#define SHTML3 "'\"><script type=\"text/javascript\"> window.location.href = \"" -#define SHTML4 "\";</script><title>Help Page Redirection</title></head><body></body></html>" +#define SHTML2 "<noscript><meta http-equiv=\"refresh\" content=\"0; url='" +#define SHTML3 "/noscript.html'\"></noscript><meta http-equiv=\"refresh\" content=\"1; url='" +#define SHTML4 "'\"><script type=\"text/javascript\"> window.location.href = \"" +#define SHTML5 "\";</script><title>Help Page Redirection</title></head><body></body></html>" // use a tempfile since e.g. xdg-open doesn't support URL-parameters with file:// URLs static bool impl_showOfflineHelp( const OUString& rURL ) @@ -945,8 +948,9 @@ static bool impl_showOfflineHelp( const OUString& rURL ) pStream->SetStreamCharSet(RTL_TEXTENCODING_UTF8); OUString aTempStr = SHTML1 SHTML2 + - aHelpLink + SHTML3 + - aHelpLink + SHTML4; + aBaseInstallPath + "/" + HelpLocaleString() + SHTML3 + + aHelpLink + SHTML4 + + aHelpLink + SHTML5; pStream->WriteUnicodeOrByteText(aTempStr); |