Closed (duplicate)
Project:
HTML corrector
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2007 at 08:55 UTC
Updated:
15 Apr 2008 at 22:20 UTC
When using the htmlcorrector module in conjunction with the adsense-injector module, the ads were not displaying correctly as it was converting the adsense comment tags from "<" to "<"
eg:
to
<!--adsense: placeholder-->
I then ended up making the following hacks to the htmlcorrector_process function to get it to ignore comment tags:
1. commented out the below line
//$text = preg_replace('!<([^a-zA-Z/])!', '<\1', $text);
2. added the following line before " // Closing tag"
/// comment tag
if ($tagname{0} == '!') {$output .= '<'.$value.'>';$tag = !$tag;continue;}
My PHP and regex is not good, so there may be a better way to do it, but this works for me.
Comments
Comment #1
reggie75 commentedSorry, I have used better formatting to describe the bug below:
---
When using the htmlcorrector module in conjunction with the adsense-injector module, the ads were not displaying correctly as it was converting the adsense comment tags from:
to
eg:
to
I then ended up making the following hacks to the htmlcorrector_process function to get it to ignore comment tags:
1. commented out the below line
2. added the following line before " // Closing tag"
My PHP and regex is not good, so there may be a better way to do it, but this works for me.
Comment #2
jcfiala commentedThis seems to be the same as issue http://drupal.org/node/97182, isn't it?
Comment #3
quicksketchYep, same issue.