Commit ffdfd9fe authored by Laurent Montel's avatar Laurent Montel 😁

Fix Bug 389169 - No setting to disable JavaScript and 3rd party content in Akregator

FIXED-IN: 5.8.0
BUG: 389169
parent c18fc0ce
......@@ -7,8 +7,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>469</width>
<height>442</height>
<width>474</width>
<height>510</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
......@@ -87,7 +87,7 @@
<item row="1" column="0">
<widget class="QRadioButton" name="kcfg_ExternalBrowserUseCustomCommand">
<property name="text">
<string>&amp;Use this command:</string>
<string>Use &amp;this command:</string>
</property>
</widget>
</item>
......@@ -135,32 +135,44 @@
</widget>
</item>
<item>
<widget class="QCheckBox" name="kcfg_CheckPhishingUrl">
<property name="text">
<string>Verify URLs using Google's Safe Browsing API</string>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Security</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QCheckBox" name="kcfg_CheckPhishingUrl">
<property name="text">
<string>Verify URLs using Google's Safe Browsing API</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="kcfg_EnableJavascript">
<property name="text">
<string>Enable Javascript</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="kcfg_AccessKeyEnabled">
<property name="text">
<string>Access Key Enabled</string>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Misc</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QCheckBox" name="kcfg_AccessKeyEnabled">
<property name="text">
<string>Access Key Enabled</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<customwidgets>
......
......@@ -171,6 +171,10 @@
</entry>
</group>
<group name="Browser" >
<entry key="EnableJavascript" type="Bool">
<label>Enable Javascript</label>
<default>true</default>
</entry>
<entry key="Always Show Tab Bar" type="Bool">
<label>Always show the tab bar</label>
<whatsthis>Always show the tab bar, even when only one tab is open</whatsthis>
......
......@@ -42,7 +42,8 @@ using namespace Akregator;
AkrWebEngineViewer::AkrWebEngineViewer(KActionCollection *ac, QWidget *parent)
: ArticleViewerWebEngine(ac, parent)
{
settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, true);
//TODO update settings when we change config
settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, Settings::checkPhishingUrl());
settings()->setAttribute(QWebEngineSettings::PluginsEnabled, false);
settings()->setAttribute(QWebEngineSettings::AutoLoadImages, true);
settings()->setAttribute(QWebEngineSettings::JavascriptCanOpenWindows, false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment