some attribute tag removed after SAVE in the EDIT Page

53 views
Skip to first unread message

Astr0 Surfer

unread,
Apr 30, 2015, 3:08:43 PM4/30/15
to refine...@googlegroups.com
Hi Folks,

now I have a issue very strange in the edit page add some HTML code and after submit some tag attributes are removed ...

This is the snippet I want to add


but after a click on 'Save' button some tag attribute are removed

example:

this:

<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">

is replaced with this

<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">

this is what refinerycms save 


Why this happens?

thanks you in advance

A

Thiago Damasceno

unread,
Apr 30, 2015, 4:21:51 PM4/30/15
to refine...@googlegroups.com
Astr0 Surfer, by default the wymeditor removes some tags/attributes, but you can set Refinery::Wymeditor.whitelist_tags to bypass that behavior.

Read refinerycms-wymeditor-1.0.6\app\assets\javascripts\wymeditor\validators.js.erb to know how to set that.

Astr0 Surfer

unread,
Apr 30, 2015, 7:38:09 PM4/30/15
to refine...@googlegroups.com
Thanks Thiago,

and it's possibile disable Refinery::Wymeditor.whitelist_tags? 

in the follow  interesting post I red about to remove tag attributes


but I want to leave the tag attributes? Exist a quick method or to do that or I have to override validator files with

rake refinery:override javascript=wymeditor**/*

and customize validators.js.erb file?

best,

A

Thiago Damasceno

unread,
Apr 30, 2015, 10:49:16 PM4/30/15
to refine...@googlegroups.com
Astr0, if there is an huge amount of tags/attributes that shouldn't be removed by the wymeditor and you don't want to add those tags/attributes in the whitelist, maybe the best thing to do is to override the validators.js.erb file.

Astr0 Surfer

unread,
May 1, 2015, 12:42:43 AM5/1/15
to refine...@googlegroups.com
Thanks for your answer Thiago,

At the end I used another solution

I create a template file app/views/refinery/pages/template_file.html.erb and put here my code :) and the page uses this template

I dont know if it's a good best practice but it works!!!

thank and bye:)

A
Reply all
Reply to author
Forward
0 new messages