When having several tags that are identical in a node, e.g. [adsense:468x60:1:1], the maximum number of ads/links per page is not honored.

For example, if you have 5 of the above tags, adsense will not stop at 4, but will display all 5 of them in violation of Google's policy.

This is causes by using str_replace() which replaces all occurrences.

Comments

kbahey’s picture

Status: Active » Fixed

This was caused by using str_replace() as the final step in processing the filter.

Now we use preg_replace with a limit of 1.

Fixed in 5.x-1.5 and HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)