Giter Club home page Giter Club logo

Comments (3)

afaundez avatar afaundez commented on August 28, 2024

Hi,

I had trouble also with interpolations, I made a gem with a slightly different approach https://github.com/afaundez/jekyll-haml-markup.

It had a lot of work to do, but I'm willing to maintain it.

from jekyll-haml.

jbschrades avatar jbschrades commented on August 28, 2024

@EvanAgee did you ever figure this out?

from jekyll-haml.

astery avatar astery commented on August 28, 2024

I assume that your string is being escaped from "{{ '/venue' | relative_url }}" to "{{ '/venue' | relative_url }}" and being ignored.

In rails it would overcome with simply adding "{{ '/venue' | relative_url }}".html_safe.

But in jekyll where is no such function for string, put this in _plugins/string_helpers.rb to obtain it:

class String
  def html_safe?
    defined?(@html_safe) && @html_safe
  end

  def html_safe
    @html_safe = true
    self
  end
end

require 'haml/helpers/xss_mods'

module Haml::Helpers
  include Haml::Helpers::XssMods
end

Credits for answer going here, look there for details.

from jekyll-haml.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.