Skip to content

Remove Google ADs from HTML documentation#343

Closed
Lastique wants to merge 1 commit into
ImageMagick:mainfrom
Lastique:feature/remove-google-ads
Closed

Remove Google ADs from HTML documentation#343
Lastique wants to merge 1 commit into
ImageMagick:mainfrom
Lastique:feature/remove-google-ads

Conversation

@Lastique
Copy link
Copy Markdown
Contributor

This removes the potential privacy breach due to referencing Google resources while viewing local documentation.

Closes #342.

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practices as demonstrated in the repository.

Description

This removes the potential privacy breach due to referencing Google
resources while viewing local documentation.

Closes ImageMagick#342.
@urban-warrior
Copy link
Copy Markdown
Member

We have a different approach, our automated script simply transforms the Google ad link to localhost preventing ads from showing.

@Lastique
Copy link
Copy Markdown
Contributor Author

Lastique commented Nov 4, 2024

It would be better if the script just removed the html tags entirely instead of mangling the URLs.

@urban-warrior
Copy link
Copy Markdown
Member

We agree and its on our TODO list-- which has over 1500 items. Post a sed script here and we'll adapt it to our build workflows. Thanks.

@Lastique
Copy link
Copy Markdown
Contributor Author

Lastique commented Oct 23, 2025

Post a sed script here and we'll adapt it to our build workflows.

@urban-warrior We are using this script to delete all Google AD links:

#!/usr/bin/env bash

readarray -d '' FILES < <(find www -name '*.html' -print0)

for FILE in "index.html" "${FILES[@]}"
do
	echo "$FILE"
	perl -i -0777 -pe 's|\n[[:space:]]*<div[^>]*>[[:space:]]*<script async="async" src="https://[^"]*/adsbygoogle\.js"></script>[[:space:]]*<ins class="adsbygoogle"[^>]*></ins>[[:space:]]*<script>[^<]*adsbygoogle[^<]*</script>[^<]*</div>||gm' "$FILE"
	perl -i -ne 'print unless m!<script (async|defer|async="async") src="https://[^"]*/adsbygoogle\.js.*!' "$FILE"
	perl -i -ne 'print unless m!<script (async|defer|async="async") src="https://[^"]*/cse\.js.*!' "$FILE"
done

urban-warrior pushed a commit to ImageMagick/ImageMagick that referenced this pull request Oct 25, 2025
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Oct 28, 2025
upstream changes:
-----------------
7.1.2-8
Commits
  * beta release d56b6af
  * GHSA-wpp4-vqfq-v4hp 7b47fe3
  * https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-g5vw-p55v-8742 8547a24
  * Also install squashfs-tools for the AppImage build. 336f2b8
  * Updated the Windows dependencies. 30bafbf
  * ImageMagick/ImageMagick6#343 (comment) 2300ae5
  * release a3b13d1
msk pushed a commit to msk/pkgsrc that referenced this pull request May 11, 2026
upstream changes:
-----------------
7.1.2-8
Commits
  * beta release d56b6af
  * GHSA-wpp4-vqfq-v4hp 7b47fe3
  * https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-g5vw-p55v-8742 8547a24
  * Also install squashfs-tools for the AppImage build. 336f2b8
  * Updated the Windows dependencies. 30bafbf
  * ImageMagick/ImageMagick6#343 (comment) 2300ae5
  * release a3b13d1
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request May 13, 2026
upstream changes:
-----------------
7.1.2-8
Commits
  * beta release d56b6af
  * GHSA-wpp4-vqfq-v4hp 7b47fe3
  * https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-g5vw-p55v-8742 8547a24
  * Also install squashfs-tools for the AppImage build. 336f2b8
  * Updated the Windows dependencies. 30bafbf
  * ImageMagick/ImageMagick6#343 (comment) 2300ae5
  * release a3b13d1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Google ADs in documentation

2 participants