Sha256: 51c20a21539a267b66b0e74ed4a74464bf3657d2caa5009b46afcb46018c4a69
Contents?: true
Size: 1.23 KB
Versions: 212
Compression:
Stored size: 1.23 KB
Contents
<% direction_class = "direction-#{direction}" if local_assigns.include?(:direction) disable_youtube_expansions = local_assigns.fetch(:disable_youtube_expansions) if local_assigns.include?(:disable_youtube_expansions) classes = [] classes << direction_class if direction_class classes << "disable-youtube" if disable_youtube_expansions %> <div class="gem-c-govspeak govuk-govspeak <%= classes.join(" ") %>" data-module="govspeak"> <% 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
212 entries across 212 versions & 1 rubygems