{"id":15704279,"url":"https://github.com/pat/enkoder","last_synced_at":"2025-05-12T16:41:52.653Z","repository":{"id":514509,"uuid":"142410","full_name":"pat/enkoder","owner":"pat","description":"An extension to the Rails TextHelper module that can be used to protect email addresses (or other information) by obfuscating them using JavaScript code. Written by Dan Benjamin.","archived":false,"fork":false,"pushed_at":"2009-03-03T23:05:52.000Z","size":80,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T00:41:19.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://hivelogic.com/enkoder/plugin","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pat.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-03-03T23:03:22.000Z","updated_at":"2022-03-03T13:58:43.000Z","dependencies_parsed_at":"2022-07-08T21:31:20.417Z","dependency_job_id":null,"html_url":"https://github.com/pat/enkoder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Fenkoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Fenkoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Fenkoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Fenkoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pat","download_url":"https://codeload.github.com/pat/enkoder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253778226,"owners_count":21962832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T20:11:05.150Z","updated_at":"2025-05-12T16:41:52.626Z","avatar_url":"https://github.com/pat.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"==Hivelogic Enkoder\n\nThe Enkoder plugin provides an extension to TextHelper that can be used to\nprotect email addresses (or other information) by obfuscating them using\nJavaScript code. The only way to decrypt the JavaScript is to actually run it,\nhiding the results from email-harvesting robots while revealing them to real\npeople.\n\nIt uses a significantly different (and some might say more secure) algorithm\nthan the built-in mail_to helper.\n\nNote: There's no guarantee here -- the only way to be completely safe is to not\npublish your address at all.\n\n\n==Installation:\n\nJust drop the \"enkoder\" folder into the /vendor/plugins folder in your project.\n\n\n==Usage:\n\nThere are two methods:\n\n\tenkode( html )\n\t\nThis method accepts a block of html (or any text) and returns an enkoded JavaScript.\n\nThe second method is:\n\n\tenkode_mail( email, link_text, title_text=nil, subject=nil )\n\nThis method takes an email address, the text to show to the viewer, optional\ntitle text (what's seen when somebody hovers over the link), and optional\nsubject for the email, and returns an enkoded email address link.\n\n\n==Examples:\n\nTo enkode a single email address, one could just do:\n\n\t\u003c%= enkode_mail('user@domain.com','click here') %\u003e\n\nAnd the following link would be returned (enkoded as JavaScript):\n\n\t\u003ca href=\"mailto:\"user@domain.com\" title=\"\"\u003eclick here\u003c/a\u003e\n\nAdding a title and subject text would require the second two optional fields:\n\n\t\u003c%= enkode_mail('user@domain.com','click here', 'email me', 'enkoder') %\u003e\n\nAnd we'd get back (enkoded as JavaScript):\n\n\t\u003ca href=\"mailto:\"user@domain.com?subject=enkoder\" title=\"email me\"\u003eclick here\u003c/a\u003e\n\nOf course we can also enkode many email addresses on the fly:\n\n\t\u003c% @users.each do |user| %\u003e\n\t\t\u003cp\u003e\u003c%= enkode_mail(@user.email,@user.name) %\u003e\u003c/p\u003e\n\t\u003c% end %\u003e\n\nTo enkode a snippet of XHTML, we can do:\n\n\t\u003c%= enkode(\"\u003cp\u003eThis block will be hidden from spambots.\u003c/p\u003e\") %\u003e\n\nWe could protect a link or block of XHTML from being indexed like this:\n\n\t\u003c%= enkode('Try and find \u003ca href=\"secret.html\"\u003ethis\u003c/a\u003e, google!') %\u003e\n\nWe could have anything we wanted in that block, XHTML, links, email addresses, etc.\n\nFor more examples and to see the full functionality of the Enkoder, have a look\nits permanent page on the web:\n\n\thttp://hivelogic.com/enkoder\n\n\n==License:\n\nCopyright (c) 2006 Automatic Corp.\n\nThis plugin is released under the LGPL license.  See LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpat%2Fenkoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpat%2Fenkoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpat%2Fenkoder/lists"}