spree / deface

Rails plugin that allows you to customize ERB views in a Rails application without editing the underlying view.
MIT License
521 stars 128 forks source link

HTML5 tags ignored ? #123

Open dunric opened 10 years ago

dunric commented 10 years ago

Hi,

Deface cann't find html 5 tags like header or nav.

Deface::Override.new(:virtual_path => 'layouts/mainapp',
                     :name => 'breadcrumbs-table-row',
                     :cut => 'code[erb-loud]:contains("breadcrumbs")',
                     :insert_after => '#myheader')

Deface: 'breadcrumbs-table-row' matched 0 times with '#myheader'

It's run on a valid HTML document containing following tag

<header id="myheader">
</header>

Underlaying Nokogiri 1.5.10 does parse the above tag correctly.

Simple replacing of tag header with div and Deface will start to match it.

Is it a bug or a feature (ie. filter out non HTML4 tags) of Deface ?

radar commented 10 years ago

@dunric Can you please share a test application that we can use to reproduce this problem? That would help us debug this problem.