Dandelion is a fair source project. View the code on Github · See the design guide
Commits on Oct 12, 2026
| 7eef73b |
Fix SafeErb's statement offenses: no Ruby control flow inside |
| 1ddb390 |
Fix SafeErb's script offenses: 49 interpolations inside |
| e5b2ba4 |
Fix the Stripe key in the organisation pay form's script, broken two commits ago: <%= ENV['STRIPE_PK'].to_json %> inside a |
| e67eb15 |
Fix SafeErb's html_safe offenses by moving html_safe out of templates. The design guide's section and subsection partials print their intro and note raw, as they're written in HTML, so the 19 calls drop .html_safe (none of the plain notes has a <, > or &, so they render the same). The SVG icon tile prints its icon with <%==. An activity block's lock goes in the block partial's icon, as organisations' check marks do, so the activity name is escaped rather than marked html_safe. 92 offenses left. |
| 764a661 |
Fix SafeErb's JavaScript attribute offenses: 20 interpolations into quoted JS strings in onclick and oninput attributes (gathering, rota, option and team links, drafts, password reset, Stripe setup, the search tabs and the ticket price symbol) now build the string in Ruby and output it with .to_json. The attribute escapes the JSON's quotes and the browser unescapes them, so the JavaScript gets the same strings, now safely quoted. 113 offenses left. |
| a0422e4 |
Add a SafeErb erb_lint linter (.erb_linters/safe_erb.rb): ErbSafety without better_html's script type check, whose list of types is fixed and leaves out text/plain and application/json. The AllowedScriptType linter already checks script types against our own list. SafeErb stays off until its other 134 offenses are worked through. |
| 7a719d2 |
Turn off HardCodedString and ErbSafety in erb_lint by saying so, rather than enabling them and excluding every template. HardCodedString flags all literal text, for translation, which we don't do. ErbSafety pointed at a .better-html.yml that doesn't exist, so it could never have run; with better_html's defaults it finds 147 offenses (some false positives) to work through. |
| eeb2ff8 |
Cache the iCal feeds without a partial. cp takes a block and caches what it returns, so the events, my events and organisation events feeds call build_events_ical directly, and the two one-line _events_ical.erb partials go. The feed no longer depends on a template's last byte, so FinalNewline needs no exclude for them. |
| 22ebaac |
Re-enable RuboCop's Layout/EndAlignment in erb_lint, autocorrected with only that cop on: eight ends in six templates are reindented to line up with the start of their if, case or assignment. Whitespace inside the tags only, so output doesn't change. That was the last rule turned off for failing on existing templates. |
| b4989cc |
Re-enable RuboCop's Lint/RedundantTypeConversion in erb_lint. Its one offense, :content.to_sym in the application layout, went in the Lint/SymbolConversion commit. |
| 51eb4e5 |
Re-enable RuboCop's Lint/RedundantSafeNavigation in erb_lint, autocorrected with only that cop on: the sort dates in the frontend dependencies and gems stats tables use x.to_i rather than x&.to_i || 0, as nil.to_i is already 0. |
| b7d32dd |
Re-enable RuboCop's Lint/UnusedBlockArgument in erb_lint, autocorrected with only that cop on: four unused block arguments in four templates get a leading underscore. Renames only. |
| 95474c5 |
Re-enable erb_lint's ClosingErbTagIndent, autocorrected with only that linter on: in 10 templates the %> of 12 multi-line tags moves onto the last line of code, or onto its own line lined up with the <%. Whitespace inside the tags only, so output doesn't change. |
| b2926cd |
Re-enable erb_lint's ExtraNewline, autocorrected with only that linter on: 14 double blank lines in 12 templates become single ones. None is in a or |
| 73274d2 |
Re-enable RuboCop's Lint/SymbolConversion in erb_lint, autocorrected with only that cop on: 23 symbols in 5 templates drop needless quotes or conversions ("name": becomes name: in the event JSON-LD, :'quick_theme_colors' becomes :quick_theme_colors, "enable_#{x}".to_sym becomes :"enable_#{x}"). They are the same symbols, so nothing changes. |
| 6f1a338 |
Re-enable erb_lint's SpaceInHtmlTag, autocorrected with only that linter on: spacing inside 89 HTML tags in 50 templates becomes one space between attributes and none before >. It also tidies the |
| 19464d6 |
Re-enable erb_lint's TrailingWhitespace, autocorrected with only that linter on: 47 lines in 29 templates lose trailing spaces. None is in a , |
| f5f1461 |
Re-enable erb_lint's SelfClosingTag, autocorrected with only that linter on: 60 void elements in 32 HTML pages and emails lose their XHTML-style slash ( , , , |
| f1befb2 |
Re-enable erb_lint's FinalNewline, autocorrected with only that linter on: 80 templates gain a final newline. Where a file ended in a <% %> tag Erubi drops it; elsewhere it adds a newline after closing HTML, which renders the same. The two iCal partials are excluded, as the feed ends where they do and a newline would add a stray line after END:VCALENDAR. |
| 7b46a8b |
Re-enable erb_lint's SpaceAroundErbTag, autocorrected with only that linter on: ERB tags get one space inside (<%= x %>, not <%=x%>), and multi-line tags lose blank lines after <% and before %>. Whitespace inside the tags only, so output doesn't change. |