vanilla / addons

Official add-ons and tools for Vanilla Forums.
http://open.vanillaforums.com
108 stars 169 forks source link

Filter meta tags with Civil Tongue #806

Closed blutarch closed 4 years ago

blutarch commented 4 years ago

Closes vanilla/support#1461

This PR fixes a problem where meta tags aren't being changed by Civil Tongue, resulting in the bad words reappearing when posts are shared via twitter or facebook. This PR replaces appearances of the bad words in meta tags with the chosen replacement.

TO TEST

  1. Enable Civil Tongue and set up a forbidden word and its replacement.
  2. Make a post with the forbidden word.
  3. Using dev tools, look at the meta tags and note that the forbidden words appear in the content attribute of meta tags.
  4. Check out this branch and verify that the words have been replaced.
nervoustwit commented 4 years ago

I have tried to test this locally, it appears to work but in order to be sure we would have to deploy this to a live site with a legit Facebook (I didn't see Twitter scraping my message and putting it in the Tweet) integration.