Sha256: f87dbda5a8ffe706779fab0e69905d4fbf8c76d2addce1e913dc5b1071168958
Contents?: true
Size: 1.34 KB
Versions: 22
Compression:
Stored size: 1.34 KB
Contents
<% direction_class = "direction-#{direction}" if local_assigns.include?(:direction) rich_govspeak = local_assigns.fetch(:rich_govspeak) if local_assigns.include?(:rich_govspeak) disable_youtube_expansions = local_assigns.fetch(:disable_youtube_expansions) if local_assigns.include?(:disable_youtube_expansions) classes = [] classes << direction_class if direction_class classes << "rich-govspeak" if rich_govspeak classes << "disable-youtube" if disable_youtube_expansions %> <div class="gem-c-govspeak govuk-govspeak <%= classes.join(" ") %>"> <% if local_assigns.include?(:content) %> <% if content.html_safe? %> <%= content %> <% else %> <% puts " You've passed in unsanitised HTML into the govspeak component as the `content` param. Passing in unsafe HTML is deprecated and will be removed in a future version. You need to pass in a block instead or use the `capture` helper. See the component guide for examples. If you're 100% sure there's no unsanitised user input in the string you could also call `.html_safe` on the string or use the `raw` helper before passing it in. Called from #{caller_locations.find { |l| l.to_s.include?('.erb') }} " %> <%= raw content %> <% end %> <% elsif block_given? %> <%= yield %> <% end %> </div>
Version data entries
22 entries across 22 versions & 1 rubygems