| Index: pages/address-masking.md |
| =================================================================== |
| --- a/pages/address-masking.md |
| +++ b/pages/address-masking.md |
| @@ -12,33 +12,41 @@ |
| 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. |
| +Base64 encode sensitive `href` addresses into `data-mask` attributes. |
| #### Markdown (before processing) |
| ``` |
| -[Private Email](#){: data-address="bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t" } |
| +[Private Email](#){: data-mask='{ "href": "bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t" }' |
|
ire
2018/05/25 07:35:05
This requires that we use a single quote for the o
juliandoucette
2018/05/25 08:50:59
You mean we can't just escape or flip the quotes t
ire
2018/05/25 09:02:10
No we can't. I will add that.
|
| + |
| +[#](#){: data-mask='{ "href": "bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t", "textContent": "dXNlcm5hbWVAZXhhbXBsZS5jb20=" }' |
|
juliandoucette
2018/05/25 08:50:59
TOL: Seems like we could make this friendlier than
ire
2018/05/25 09:02:10
Changed to "email"
|
| ``` |
| #### HTML (before processing) |
| ``` |
| -<a data-address="bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t">Private Email</a> |
| +<a data-mask='{ "href": "bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t" }'>Private Email</a> |
| + |
| +<a data-mask='{ "href": "bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t", "textContent": "dXNlcm5hbWVAZXhhbXBsZS5jb20=" }'>#</a> |
| ``` |
| #### Output (after processing) |
| ``` |
| <a href="mailto:username@example.com">Private Email</a> |
| + |
| +<a href="mailto:username@example.com">username@example.com</a> |
| ``` |
| ## Example |
| <script src="/js/address-masking.js"></script> |
| -<a data-address="bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t">Private Email</a> |
| +<a data-mask='{ "href": "bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t" }'>Private Email</a> |
| + |
| +<a data-mask='{ "href": "bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t", "textContent": "dXNlcm5hbWVAZXhhbXBsZS5jb20=" }'>#</a> |