Merge pull request #288 from elelay/html-shownotes-disable-javascript

disable java, javascript, plugins in HTML shownotes
This commit is contained in:
Adam Voss 2017-04-23 10:36:15 -05:00 committed by GitHub
commit 78ae55fa90
1 changed files with 6 additions and 1 deletions

View File

@ -174,7 +174,12 @@ class gPodderShownotesText(gPodderShownotes):
class gPodderShownotesHTML(gPodderShownotes):
def init(self):
self.html_view = WebKit2.WebView()
# basic restrictions
settings = WebKit2.Settings()
settings.set_enable_java(False)
settings.set_enable_plugins(False)
settings.set_enable_javascript(False)
self.html_view = WebKit2.WebView.new_with_settings(settings)
self.html_view.set_property('expand', True)
self.html_view.connect('mouse-target-changed', self.on_mouse_over)
self.html_view.connect('context-menu', self.on_context_menu)