Git Product home page Git Product logo

Comments (1)

leeadkins avatar leeadkins commented on August 23, 2024

It seems the behavior of calling to_s on the items in:

content_tag(:ul, items, :class => 'navigation')

results in some escaping that isn't easily fixable by calling html_safe or raw on things. At least it wasn't for the little time I allocated to the problem.

A quick and easy fix for this if you need someone needs it now is to replace this line:

 content_tag(:ul, items, :class => 'navigation')

at the end of the navigation method in the navigation.rb file within the plugin directory to this:

 content_tag :ul, :class => 'navigation' do
    items.join('')
 end

The only difference is that this new way explicitly joins all the content tags in the items array into a single string rather than let the content_tag handle it, so you don't have to attempt to figure out exactly where the escaping may or may not be occurring.

from navigation_helper.

Related Issues (2)

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.