Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/AdblockPlusDomTraverser.cpp

Issue 29330709: Issue #3343 - Eliminate unescaping of URL (Closed)
Patch Set: Reverted unrelated defect introduction Created Nov. 25, 2015, 4:17 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/plugin/PluginClass.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 // Images 63 // Images
64 if (tag == "img") 64 if (tag == "img")
65 { 65 {
66 CComVariant vAttr; 66 CComVariant vAttr;
67 67
68 if (SUCCEEDED(pEl->getAttribute(ATL::CComBSTR(L"src"), 0, &vAttr)) && vAttr. vt == VT_BSTR && ::SysStringLen(vAttr.bstrVal) > 0) 68 if (SUCCEEDED(pEl->getAttribute(ATL::CComBSTR(L"src"), 0, &vAttr)) && vAttr. vt == VT_BSTR && ::SysStringLen(vAttr.bstrVal) > 0)
69 { 69 {
70 std::wstring src(vAttr.bstrVal, SysStringLen(vAttr.bstrVal)); 70 std::wstring src(vAttr.bstrVal, SysStringLen(vAttr.bstrVal));
71 UnescapeUrl(src);
72 71
73 // If src should be blocked, set style display:none on image 72 // If src should be blocked, set style display:none on image
74 cache->m_isHidden = client->ShouldBlock(src, 73 cache->m_isHidden = client->ShouldBlock(src,
75 AdblockPlus::FilterEngine::ContentType::CONTENT_TYPE_IMAGE, m_domain); 74 AdblockPlus::FilterEngine::ContentType::CONTENT_TYPE_IMAGE, m_domain);
76 if (cache->m_isHidden) 75 if (cache->m_isHidden)
77 { 76 {
78 HideElement(pEl, "image", src, true, indent); 77 HideElement(pEl, "image", src, true, indent);
79 return false; 78 return false;
80 } 79 }
81 } 80 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 151
153 #ifdef ENABLE_DEBUG_RESULT 152 #ifdef ENABLE_DEBUG_RESULT
154 if (isDebug) 153 if (isDebug)
155 { 154 {
156 CPluginDebug::DebugResultHiding(ToWstring(type), url, L"-"); 155 CPluginDebug::DebugResultHiding(ToWstring(type), url, L"-");
157 } 156 }
158 #endif // ENABLE_DEBUG_RESULT 157 #endif // ENABLE_DEBUG_RESULT
159 } 158 }
160 } 159 }
161 } 160 }
OLDNEW
« no previous file with comments | « no previous file | src/plugin/PluginClass.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld