Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Hancock <stevenh512@gmail.com>2012-05-29 08:31:27 +0400
committerSteven Hancock <stevenh512@gmail.com>2012-05-29 08:31:27 +0400
commitc2bc7272fb3146c79ea0381c3eef4227b11a8315 (patch)
tree3566ad7d32d444c9c38d6c9017a4a5f39f43ae2d /config/initializers
parentf68f14aa5bbd9079573756f85dd83c1402b5d718 (diff)
Escape hashtags in emails
Custom Redcarpet renderer to escape hashtags (but not legitimate headers) in emails before Markdown processing. Prevents hashtags from being rendered as H1 headers. This also leaves open the possibility of parsing hashtags into clickable links in the future. fixes #3325
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/markerb.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/config/initializers/markerb.rb b/config/initializers/markerb.rb
new file mode 100644
index 000000000..3d7351b6b
--- /dev/null
+++ b/config/initializers/markerb.rb
@@ -0,0 +1,3 @@
+require Rails.root.join("lib", "diaspora", "markdownify_email")
+
+Rails.application.config.markerb.renderer = Diaspora::Markdownify::Email \ No newline at end of file