Comments (5)
Trying to fix this issue I did some testing for it and this is what I found out:
||log.
- original adblock record
^log.*.
- converted with fix from #23
This is still not right. After fix it would not catch frazes with blog.mypage.com
, but still would catch stuff like loggingintothepage.mypage.com
.
The only proper combination I found was ^log\.(*PRUNE).*?
as this would catch log.mypage.com
, but not loggingintothepage.mypage.com
.
Proposed solution is to change all instances of .
into \.
even in hostnames not only in patterns like it is now and change = lst : "*." into = lst : "(*PRUNE).*?"
While changing the latter was easy in the adblock2privoxy code not knowing haskell I am not sure how to changed it within the code for dots and was able to do so partially only with sed -i -e '/\./{/^\^/s/\./\\./}'
afterwords - change instances of dot into \dot but only for lines starting with ^.
My attempts to fix this in the code failed so far and help fixing it is welcomed.
from adblock2privoxy.
After a bit of trial and error I come with this. Not only it compiles but also seems to work just like expected :) It is combined with previous patch for #23
diff -Naur adblock2privoxy-9999.old/adblock2privoxy/src/PatternConverter.hs adblock2privoxy-9999/adblock2privoxy/src/PatternConverter.hs
--- adblock2privoxy-9999.old/adblock2privoxy/src/PatternConverter.hs 2018-07-23 14:45:40.829753697 +0200
+++ adblock2privoxy-9999/adblock2privoxy/src/PatternConverter.hs 2018-07-23 14:47:28.325970392 +0200
@@ -34,20 +34,22 @@
| otherwise = "/"
host' = case host of
"" -> ""
- _ -> changeFirst.changeLast $ host
+ _ -> changeFirst.changeMiddle.changeLast $ host
where
changeLast [] = []
changeLast [lst]
| lst == '|' || lst `elem` hostSeparators = []
- | lst == '*' || lst == '\0' = "*."
- | otherwise = lst : "*."
+ | lst == '*' || lst == '\0' = "(*PRUNE).*?"
+ | otherwise = lst : "(*PRUNE).*?"
changeLast (c:cs) = c : changeLast cs
+ changeMiddle = replace "." "\\."
+
changeFirst [] = []
changeFirst (first:cs)
| first == '*' = '.' : '*' : cs
| bindStart == Hard || proto /= "" = first : cs
- | bindStart == Soft = '.' : first : cs
+ | bindStart == Soft = '^' : first : cs
| otherwise = '.' : '*' : first : cs
query' = case query of
from adblock2privoxy.
@wmyrda I’m honestly still swamped with other projects, but am starting to think about thinking about addressing all the great issues you’ve raised. Rather than work through these linearly, would you please triage what you believe to be the most important issues?
Also, you raised compiler issues in another thread. That one perhaps is the most fundamental because the code refactoring should be done in such a way that it isn’t undone by a version upgrade.
It looks like this may be one the highest priority issues to address. Would you Please weigh in? Note that in markdown you can refer to stuff easily with e.g. #19
#19 links.
from adblock2privoxy.
Please do not feel like I am pushing You to do stuff, so definitely you may address them whenever You desire.
To make it easier follow what is important I will create another issue which would summarize all open bugs along with my subjective importance (low/medium/severe) and scope of required work (trivial/normal/high).
For compiler issue I think help is coming.
from adblock2privoxy.
Fixed. See comments in #10.
from adblock2privoxy.
Related Issues (20)
- adblock2privoxy segmentation fault HOT 2
- element hidding whitelists undesired behaviour HOT 1
- empty rules HOT 2
- disregarding information following $ HOT 2
- translated records get dot in front which has adverse effects HOT 3
- TODO: remove matched element conversion HOT 1
- adblock2privoxy compilation fail with GHC 8.4.3 HOT 12
- META: work plan for cureent issues HOT 1
- New feature: duplicate detection HOT 1
- unintended escape characters for [ and ] HOT 3
- update filterlist HOT 4
- Dead Download links. HOT 2
- Filters are not taken effect HOT 4
- Ad2p run breaks with "Illegal instruction" HOT 3
- The site https://projects.zubr.me/wiki/adblock2privoxyDownloads does not open HOT 1
- rsync: link_stat "/root/adblock2privoxy*" failed: No such file or directory (2) HOT 5
- Missing client-header tagger 'ab2p-elemhide-check-debug' HOT 2
- Installation: stack command fails with "specified targets matched no packages"
- *nix installation instructions not working as written HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adblock2privoxy.