sul-dlss / mods_display

MODS Display is a gem to centralize the display logic of MODS medadata.
Other
2 stars 5 forks source link

<br> tags are coming out xml escaped: #107

Closed jcoyne closed 2 years ago

jcoyne commented 2 years ago
mods_display = ModsDisplay::Record.new(mods).mods_display_html.body
=> "<dl>\n    ...<dt>Alternative title</dt>\n\n  <dd>\n    Floreal&lt;br /&gt;Changeant&lt;br /&gt;Hommage a Heinrich Schuetz&lt;br /&gt;Surprise\n</dd>\n ...</dl>"

The mods itself looks like:

<?xml version="1.0" encoding="UTF-8"?>
<mods xmlns="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xlink="http://www.w3.org/1999/xlink" version="3.7" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-7.xsd">
  <titleInfo usage="primary">
    <title>Compose</title>
    <subTitle>for two pianos and orchestral groups. Floreal, for orchestra. Changeant, for cello and orchestra. Hommage a Heinrich Schuetz. Surprise for string orchestra</subTitle>
    <partNumber>volume 1</partNumber>
    <partName>issue 2</partName>
  </titleInfo>
  <titleInfo type="uniform" nameTitleGroup="1">
    <title>Compose</title>
  </titleInfo>
  <name nameTitleGroup="1" usage="primary" type="personal">
    <namePart>Kelemen, Milko</namePart>
  </name>
  <titleInfo type="alternative">
    <title>Floreal</title>
  </titleInfo>
  <titleInfo type="alternative">
    <title>Changeant</title>
  </titleInfo>
  <titleInfo type="alternative">
    <title>Hommage a Heinrich Schuetz</title>
  </titleInfo>
  <titleInfo type="alternative">
    <title>Surprise</title>
  </titleInfo>
  <typeOfResource>sound recording-musical</typeOfResource>
  <physicalDescription>
    <form authority="gmd">sound recording</form>
    <extent>2s. 12in.  33.3rpm. stereophonic.</extent>
  </physicalDescription>
  <language>
    <languageTerm authority="iso639-2b" type="code">eng</languageTerm>
  </language>
  <note>Title from slipcase.</note>
  <note>Various performers; the 4th work for soprano and chorus.</note>
  <note>Program notes by the composer on slipcase.</note>
  <originInfo>
    <dateIssued encoding="marc">1973</dateIssued>
    <place>
      <placeTerm authority="marccountry" type="code">ne</placeTerm>
    </place>
    <issuance>monographic</issuance>
  </originInfo>
  <originInfo>
    <dateIssued>[1973]</dateIssued>
    <place>
      <placeTerm type="text">Philips 6500 314.</placeTerm>
    </place>
  </originInfo>
  <identifier type="lccn">74761252</identifier>
  <identifier type="issue number">6500 314 Philips</identifier>
  <location>
    <url usage="primary display">https://sul-purl-stage.stanford.edu/bb009qd5948</url>
  </location>
  <relatedItem type="host">
    <titleInfo>
      <title>postgres origin</title>
    </titleInfo>
    <location>
      <url>https://sul-purl-stage.stanford.edu/vm851pt1780</url>
    </location>
    <typeOfResource collection="yes"/>
  </relatedItem>
  <accessCondition type="useAndReproduction">sure, why not</accessCondition>
  <accessCondition type="copyright">copyright wants to be perpetual 2/16</accessCondition>
  <accessCondition type="license" xlink:href="https://creativecommons.org/licenses/by/4.0/legalcode">This work is licensed under a Creative Commons Attribution 4.0 International license (CC BY).</accessCondition>
</mods>