CollectionBuilder / collectionbuilder-csv

CollectionBuilder-CSV is a "stand alone" template for creating digital collection and exhibit websites using Jekyll and a metadata CSV.
MIT License
23 stars 19 forks source link

escape in liquid in browse-js casuse issues with buttons #21

Closed dcnb closed 3 years ago

dcnb commented 3 years ago

Namely, the buttons split on the semi-colons that get added because of the " | escape " option on the field in the json at top. I got rid of it in the campusart collection I just did, and didn't have any ill effects, but I thought you'd probably want to go in and make sure taking that out doesn't break too much.

the campus art collection had buttons like: Admin President's room on the second floor, which would break into the buttons:

Not a huge deal, but I can see it being annoying if it happens in the wild.

evanwill commented 3 years ago

@dcnb i think the | escape in the value of {{ f.field | escape | jsonify }}:{{ i[f.field] | strip | escape | jsonify }}, should go away-- normally these values are escaped since they are going to be displayed as html, but in this case we are splitting btn values on ; so obvious bug in current set up... it seems pretty likely to break btns! so unless you can think of a counter example where escape is catching an different issue introduced by a metadata value that we need to accommodate-- just delete the one escape there.

eventually need to think through / test places where | escape | jsonify are used together--not sure if it is ever necessary? Like it might be for js variable names? but not sure...

evanwill commented 3 years ago

interesting this isn't in any other template. Anyway, removed escape for now, e7640392412c85ad77a5754c204a37ba8c479b82