Merge lp:~tuxator/midori/adblock-update-meta into lp:midori

Proposed by Paweł Forysiuk
Status: Merged
Approved by: Cris Dywan
Approved revision: 6747
Merged at revision: 6749
Proposed branch: lp:~tuxator/midori/adblock-update-meta
Merge into: lp:midori
Diff against target: 25 lines (+3/-1)
2 files modified
extensions/adblock/extension.vala (+2/-0)
extensions/adblock/updater.vala (+1/-1)
To merge this branch: bzr merge lp:~tuxator/midori/adblock-update-meta
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Review via email: mp+227141@code.launchpad.net

Commit message

Make adblock skip non-standard last update metadata strings

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

Makes sense.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'extensions/adblock/extension.vala'
2--- extensions/adblock/extension.vala 2014-03-26 21:12:05 +0000
3+++ extensions/adblock/extension.vala 2014-07-17 04:47:13 +0000
4@@ -791,6 +791,8 @@
5 { "[Adblock Plus 2.0]\n! Last modification time (GMT): 2012.11.05 13:33\n! Expires: 5 days (update frequency)\n", true, true },
6 { "[Adblock Plus 2.0]\n! Last modification time (GMT): 2012.11.05 13:33\n", true, true },
7 { "[Adblock]\n ! dummy, i dont have any dates\n", false, true },
8+ /* non-standard update time metadata as found in http://abp.mozilla-hispano.org/nauscopio/filtros.txt */
9+ { "[Adblock Plus 2.0]\n ! Last modified: Oct 26, 2013 18:00 UTC\n ! This list expires after 5 days\n! Last modified by maty: 12Oct2013\n! \n", false, true },
10 { "\n", false, false }
11 };
12
13
14=== modified file 'extensions/adblock/updater.vala'
15--- extensions/adblock/updater.vala 2014-03-06 21:33:43 +0000
16+++ extensions/adblock/updater.vala 2014-07-17 04:47:13 +0000
17@@ -70,7 +70,7 @@
18 expires = null;
19
20 /* We have "last modification" metadata */
21- if (last_mod_meta != null) {
22+ if (last_mod_meta != null && (last_mod_meta.contains (" ") && last_mod_meta[0].isdigit () == true)) {
23 int h = 0, min = 0, d, m, y;
24 /* Date in a form of: 20.08.2012 12:34 */
25 if (last_mod_meta.contains (".") || last_mod_meta.contains("-")) {

Subscribers

People subscribed via source and target branches

to all changes: