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

Unified Diff: pages/address-masking.md

Issue 29773577: Fixes #68 - Implemented address masking script (Closed) Base URL: https://hg.adblockplus.org/website-defaults
Patch Set: Addressed #3 Created May 7, 2018, 11:47 p.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 | « no previous file | pages/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pages/address-masking.md
===================================================================
new file mode 100644
--- /dev/null
+++ b/pages/address-masking.md
@@ -0,0 +1,44 @@
+title=Address Masking
+description=Use address masking to avoid spam.
+
+# Address masking
+
+Use address masking to avoid spam.
+
+## Usage
+
+### Step 1: Include script on page
+
+Include the following script at the bottom of a page:
+
+```
+<script src="/js/address-masking.js"></script>
+```
+
+### Step 2: Base64 encode addresses
+
+Base64 encode sensitive `href` addresses into `data-address` attributes.
+
+#### Markdown (before processing)
+
+```
+[Private Email](#){: data-address="bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t" }
+```
+
+#### HTML (before processing)
+
+```
+<a data-address="bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t">Private Email</a>
+```
+
+#### Output (after processing)
+
+```
+<a href="mailto:username@example.com">Private Email</a>
+```
+
+## Example
+
+<script src="/js/address-masking.js"></script>
+
+<a data-address="bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t">Private Email</a>
« no previous file with comments | « no previous file | pages/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld