Merge pull request #8137 from colinux/pdf-without-html
fix(pdf): strip html tags in type_de_champ descriptions
This commit is contained in:
commit
12d070fc83
2 changed files with 2 additions and 2 deletions
|
@ -115,7 +115,7 @@ def add_explanation(pdf, explanation)
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_optionnal_description(pdf, champ)
|
def add_optionnal_description(pdf, champ)
|
||||||
add_explanation(pdf, champ.description.strip + "\n\n") if champ.description.present?
|
add_explanation(pdf, strip_tags(champ.description).strip + "\n\n") if champ.description.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_single_champ(pdf, champ)
|
def render_single_champ(pdf, champ)
|
||||||
|
|
|
@ -142,7 +142,7 @@ def add_single_champ(pdf, champ)
|
||||||
when 'Champs::HeaderSectionChamp'
|
when 'Champs::HeaderSectionChamp'
|
||||||
add_section_title(pdf, tdc.libelle)
|
add_section_title(pdf, tdc.libelle)
|
||||||
when 'Champs::ExplicationChamp'
|
when 'Champs::ExplicationChamp'
|
||||||
format_in_2_lines(pdf, tdc.libelle, tdc.description)
|
format_in_2_lines(pdf, tdc.libelle, strip_tags(tdc.description))
|
||||||
when 'Champs::CarteChamp'
|
when 'Champs::CarteChamp'
|
||||||
format_in_2_lines(pdf, tdc.libelle, champ.to_feature_collection.to_json)
|
format_in_2_lines(pdf, tdc.libelle, champ.to_feature_collection.to_json)
|
||||||
when 'Champs::SiretChamp'
|
when 'Champs::SiretChamp'
|
||||||
|
|
Loading…
Reference in a new issue