summaryrefslogtreecommitdiffstats
path: root/help3xsl
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2018-01-09 12:44:59 -0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2018-01-10 01:14:56 +0100
commit2c7cfc527a05ef757ab3ecfd6ab5a2582a104680 (patch)
tree8b95286bc2ab931175febce9c04ae191254ffab7 /help3xsl
parentAdd l10n to the 'Module' string in Help UI (diff)
downloadhelp-2c7cfc527a05ef757ab3ecfd6ab5a2582a104680.tar.gz
help-2c7cfc527a05ef757ab3ecfd6ab5a2582a104680.zip
Add Content-Security-Policies in new Help pages
Change-Id: I115fc16fbf4b8284bfedc735761434bb586f0355 Reviewed-on: https://gerrit.libreoffice.org/47660 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl')
-rw-r--r--help3xsl/help.html1
-rw-r--r--help3xsl/index.html1
-rw-r--r--help3xsl/index2.html83
-rw-r--r--help3xsl/online_transform.xsl1
4 files changed, 45 insertions, 41 deletions
diff --git a/help3xsl/help.html b/help3xsl/help.html
index 8dc4e67c28..015f753575 100644
--- a/help3xsl/help.html
+++ b/help3xsl/help.html
@@ -9,6 +9,7 @@
<html>
<head>
<script type="text/javascript" src="latest/help.js"></script>
+ <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' piwik.documentfoundation.org *.google.com *.googleapis.com"/>
</head>
<body>
<script type="text/javascript">
diff --git a/help3xsl/index.html b/help3xsl/index.html
index 9300f1b866..fcaa9bdda6 100644
--- a/help3xsl/index.html
+++ b/help3xsl/index.html
@@ -8,6 +8,7 @@
-->
<html>
<head>
+ <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' piwik.documentfoundation.org *.google.com *.googleapis.com"/>
</head>
<body>
<script type="text/javascript">
diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index adc2010e80..6f4fc7f39a 100644
--- a/help3xsl/index2.html
+++ b/help3xsl/index2.html
@@ -7,46 +7,47 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<html>
- <head>
- <script type="text/javascript" src="help.js"></script>
- <script type="text/javascript" src="hid2file.js"></script>
- </head>
- <body>
- <script type="text/javascript">
- var url = window.location.href;
- var n = url.indexOf('index.html?');
- if (n != -1){
- // the URL came from LibreOffice help (F1)
- var version = getParameterByName("Version",url);
- var lang = getParameterByName("Language",url);
- var system = getParameterByName("System",url);
- var rest= url.substr(n+11,url.lenght);
- var module;
- var defaultFile;
- var smodule = rest.substr(0, rest.indexOf('/'));
- switch (smodule) {
- case "swriter": {defaultFile='text/swriter/main0000.html';module="WRITER";break;}
- case "scalc": {defaultFile='text/scalc/main0000.html';module="CALC";break;}
- case "simpress": {defaultFile='text/simpress/main0000.html';module="IMPRESS";break;}
- case "sdraw": {defaultFile='text/sdraw/main0000.html';module="DRAW";break;}
- case "smath": {defaultFile='text/smath/main0000.html';module="MATH";break;}
- case "sdatabase": {defaultFile='text/shared/explorer/database/main.html';module="BASE";break;}
- case "sbasic": {defaultFile='text/sbasic/shared/main0601.html';module="BASIC";break;}
- default: {defaultFile='text/shared/main0000.html';module="WRITER";break;}
- }
- var bookmark = rest.slice(rest.indexOf('/')+1, rest.indexOf('?'));
- var file = map[bookmark];
- // rebuild URL
- if (file=='undefined'){
- file = defaultFile;
- }
- var newURL = lang+'/'+file+'?System='+system+'&DbPAR='+module;
- window.open(newURL,'_self');
- }else{
- // URL came from elsewhere, direct access to webroot, we redirect to main Help page
- window.open('en-US/text/shared/main0108.html?&DbPAR=WRITER&System=WIN','_self');
- }
- </script>
- </body>
+<head>
+ <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' piwik.documentfoundation.org *.google.com *.googleapis.com"/>
+ <script type="text/javascript" src="help.js"></script>
+ <script type="text/javascript" src="hid2file.js"></script>
+</head>
+<body>
+<script type="text/javascript">
+ var url = window.location.href;
+ var n = url.indexOf('index.html?');
+ if (n != -1){
+ // the URL came from LibreOffice help (F1)
+ var version = getParameterByName("Version",url);
+ var lang = getParameterByName("Language",url);
+ var system = getParameterByName("System",url);
+ var rest= url.substr(n+11,url.lenght);
+ var module;
+ var defaultFile;
+ var smodule = rest.substr(0, rest.indexOf('/'));
+ switch (smodule) {
+ case "swriter": {defaultFile='text/swriter/main0000.html';module="WRITER";break;}
+ case "scalc": {defaultFile='text/scalc/main0000.html';module="CALC";break;}
+ case "simpress": {defaultFile='text/simpress/main0000.html';module="IMPRESS";break;}
+ case "sdraw": {defaultFile='text/sdraw/main0000.html';module="DRAW";break;}
+ case "smath": {defaultFile='text/smath/main0000.html';module="MATH";break;}
+ case "sdatabase": {defaultFile='text/shared/explorer/database/main.html';module="BASE";break;}
+ case "sbasic": {defaultFile='text/sbasic/shared/main0601.html';module="BASIC";break;}
+ default: {defaultFile='text/shared/main0000.html';module="WRITER";break;}
+ }
+ var bookmark = rest.slice(rest.indexOf('/')+1, rest.indexOf('?'));
+ var file = map[bookmark];
+ // rebuild URL
+ if (file=='undefined'){
+ file = defaultFile;
+ }
+ var newURL = lang+'/'+file+'?System='+system+'&DbPAR='+module;
+ window.open(newURL,'_self');
+ }else{
+ // URL came from elsewhere, direct access to webroot, we redirect to main Help page
+ window.open('en-US/text/shared/main0108.html?&DbPAR=WRITER&System=WIN','_self');
+ }
+</script>
+</body>
</html>
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index ab787411c4..31295b51d3 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -120,6 +120,7 @@
<head>
<base href="{$install}"/>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
+ <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' piwik.documentfoundation.org *.google.com *.googleapis.com"/>
<title><xsl:value-of select="$titleL10N"/></title>
<link rel="shortcut icon" href="{$productversion}/media/navigation/favicon.ico" />
<link type="text/css" href="{$productversion}/normalize.css" rel="Stylesheet" />