diff options
author | Jeremy <jeremy.benoist@gmail.com> | 2015-02-07 18:28:30 +0100 |
---|---|---|
committer | Jeremy <jeremy.benoist@gmail.com> | 2015-02-07 18:28:31 +0100 |
commit | 8125b415d8f3bd15b8b9169fb8fc528a51603edc (patch) | |
tree | 7c410593d4ffd50007965242b1e04da1eb1aa409 /src/Wallabag | |
parent | d01db0c71dcf183f1676b6b06206456138cb7660 (diff) | |
download | wallabag-8125b415d8f3bd15b8b9169fb8fc528a51603edc.tar.gz wallabag-8125b415d8f3bd15b8b9169fb8fc528a51603edc.tar.zst wallabag-8125b415d8f3bd15b8b9169fb8fc528a51603edc.zip |
Avoid raw javascript in template
It kills the Symfony Crawler :)
Diffstat (limited to 'src/Wallabag')
4 files changed, 3 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/public/js/bookmarklet.js b/src/Wallabag/CoreBundle/Resources/public/js/bookmarklet.js new file mode 100644 index 00000000..2afdfc3c --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/public/js/bookmarklet.js | |||
@@ -0,0 +1,2 @@ | |||
1 | |||
2 | top["bookmarklet-url@wallabag.org"]=""+"<!DOCTYPE html>"+"<html>"+"<head>"+"<title>bag it!</title>"+'<link rel="icon" href="tpl/img/favicon.ico" />'+"</head>"+"<body>"+"<script>"+"window.onload=function(){"+"window.setTimeout(function(){"+"history.back();"+"},250);"+"};"+"</scr"+"ipt>"+"</body>"+"</html>" | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/_bookmarklet.html.twig b/src/Wallabag/CoreBundle/Resources/views/_bookmarklet.html.twig deleted file mode 100644 index fd662c19..00000000 --- a/src/Wallabag/CoreBundle/Resources/views/_bookmarklet.html.twig +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | <script type="text/javascript"> | ||
2 | top["bookmarklet-url@wallabag.org"]=""+"<!DOCTYPE html>"+"<html>"+"<head>"+"<title>bag it!</title>"+'<link rel="icon" href="tpl/img/favicon.ico" />'+"</head>"+"<body>"+"<script>"+"window.onload=function(){"+"window.setTimeout(function(){"+"history.back();"+"},250);"+"};"+"</scr"+"ipt>"+"</body>"+"</html>" | ||
3 | </script> | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/_head.html.twig b/src/Wallabag/CoreBundle/Resources/views/_head.html.twig index f123183b..726b4163 100755 --- a/src/Wallabag/CoreBundle/Resources/views/_head.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/_head.html.twig | |||
@@ -37,3 +37,4 @@ | |||
37 | <script src="{{ asset('themes/_global/js/saveLink.js') }}"></script> | 37 | <script src="{{ asset('themes/_global/js/saveLink.js') }}"></script> |
38 | <script src="{{ asset('themes/_global/js/popupForm.js') }}"></script> | 38 | <script src="{{ asset('themes/_global/js/popupForm.js') }}"></script> |
39 | <script src="{{ asset('themes/baggy/js/closeMessage.js') }}"></script> | 39 | <script src="{{ asset('themes/baggy/js/closeMessage.js') }}"></script> |
40 | <script src="{{ asset('bundles/wallabagcore/js/bookmarklet.js') }}"></script> | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/layout.html.twig index f062672c..e9ccc58c 100644 --- a/src/Wallabag/CoreBundle/Resources/views/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/layout.html.twig | |||
@@ -12,7 +12,6 @@ | |||
12 | <![endif]--> | 12 | <![endif]--> |
13 | <title>{% block title %}{% endblock %} - wallabag</title> | 13 | <title>{% block title %}{% endblock %} - wallabag</title> |
14 | {% include "WallabagCoreBundle::_head.html.twig" %} | 14 | {% include "WallabagCoreBundle::_head.html.twig" %} |
15 | {% include "WallabagCoreBundle::_bookmarklet.html.twig" %} | ||
16 | </head> | 15 | </head> |
17 | <body> | 16 | <body> |
18 | {% include "WallabagCoreBundle::_top.html.twig" %} | 17 | {% include "WallabagCoreBundle::_top.html.twig" %} |