Mange / roadie

Making HTML emails comfortable for the Ruby rockstars
MIT License
1.34k stars 85 forks source link

Add some system for telling the developer to fix certain things in their emails #93

Open Mange opened 10 years ago

Mange commented 10 years ago

Roadie should have some form of reporting system where it can scan an email for bad patterns and tell the user about it.

Suggestions for "warnings":

  1. Report on invalid URLs
  2. Warn about <form>, etc. in the email

Reporting should be transparent and optional. Ideas on implementation:

# Sample 1
unless RACK_ENV == "production"
  document.report_problems = ->(error, doc) {
    My.logger.warn error
  }
end

# Sample 2
document.report_problems = true
html = document.transform
document.problems #=> [#<Roadie::Problem "Invalid URL: ...">]
Mange commented 6 years ago

This will probably not happen due to maintenance mode.

Maybe someone else wants to pick this up?