sfx2/source/appl/sfxhelp.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
New commits: commit eb0d68a963d42e07d4b1572f6b6546ffb607e2c1 Author: Olivier Hallot <olivier.hal...@libreoffice.org> AuthorDate: Fri Jun 12 20:22:18 2020 -0300 Commit: Olivier Hallot <olivier.hal...@libreoffice.org> CommitDate: Sat Jun 13 12:41:36 2020 +0200 tdf#133928 Help need javascript enabled in browser Warn user that javascript must be enabled to display Help pages Change-Id: I3c2fd6bea68346584faef2a0f8d4e383ffcf1bc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96237 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org> 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits