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

Unified Diff: src/plugin/PluginWbPassThrough.cpp

Issue 29331669: Issue 3237 - Whitelisted AFS ad is not shown on netzwelt.de (Closed)
Patch Set: Move subdocument detection to the top. Created Dec. 15, 2015, 2:05 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/plugin/PluginDomTraverserBase.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginWbPassThrough.cpp
===================================================================
--- a/src/plugin/PluginWbPassThrough.cpp
+++ b/src/plugin/PluginWbPassThrough.cpp
@@ -144,6 +144,11 @@
ContentType WBPassthruSink::GetContentTypeFromMimeType(const std::wstring& mimeType)
Eric 2015/12/15 03:18:18 While not strictly necessary, there are a few thin
sergei 2015/12/15 15:29:31 The same from my side.
{
+ if ((mimeType.find(L"text/html") != std::wstring::npos) ||
+ (mimeType.find(L"application/xhtml+xml") != std::wstring::npos))
+ {
+ return ContentType::CONTENT_TYPE_SUBDOCUMENT;
+ }
if (mimeType.find(L"image/") != std::wstring::npos)
{
return ContentType::CONTENT_TYPE_IMAGE;
@@ -160,10 +165,6 @@
{
return ContentType::CONTENT_TYPE_OBJECT;
}
- if (mimeType.find(L"text/html") != std::wstring::npos)
- {
- return ContentType::CONTENT_TYPE_SUBDOCUMENT;
- }
// It is important to have this check last, since it is rather generic, and might overlay text/html, for example
if (mimeType.find(L"xml") != std::wstring::npos)
{
« no previous file with comments | « src/plugin/PluginDomTraverserBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld