Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-10295

Text formatting (partly) broken in collection descriptions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Collections
    • Labels:
      None

      Description

      Collections use the same formatting as annotations it seems. But with certain formatting the entire description breaks apart. That is, HTML tags are shown instead. 

      Specific test cases:
      bold
      bold italics
      code
      doc link
      edit
      formatted URL
      headings
      horizontal rule
      italic
      list
      unformatted URL

      https://musicbrainz.org/collection/d64d5a09-1ce7-4799-b6af-ab4dfab6a880

      = h1 =
      == h2 ==
      === h3 ===
      ==== h4 ====
      ===== h5 =====
      ====== h6 ======
      ======= h7 =======
      ======== h8 ========
      lol, more than 6 headings
      ----
      ''italic''
      '''bold'''
      '''''bold italics'''''
      interesting, using certain text formatting triggers a <br> instead of <p>
      angle brackets are escaped :)
      
          * list item
                * code (meh)
      
      edit #12345
      [Edit_Note]
      [https://musicbrainz.org/|formatted URL]
      https://musicbrainz.org/ (unformatted)
      
      why not follow musicbrainz.org :(
      
      And now the fix:
      &#61; h1 &#61;
      
      didn't work :(
      
      Part 2: https://musicbrainz.org/collection/edcd60cb-8788-4cf7-9eb6-80e81841ec68

       Page source:

      &lt;h1&gt;h1&lt;/h1&gt;
      &lt;h2&gt;h2&lt;/h2&gt;
      &lt;h3&gt;h3&lt;/h3&gt;
      &lt;h4&gt;h4&lt;/h4&gt;
      &lt;h5&gt;h5&lt;/h5&gt;
      &lt;h6&gt;h6&lt;/h6&gt;
      &lt;h7&gt;h7&lt;/h7&gt;
      &lt;h8&gt;h8&lt;/h8&gt;&lt;p&gt;lol, more than 6 headings&lt;/p&gt;
      &lt;hr /&gt;&lt;p&gt;&lt;em&gt;italic&lt;/em&gt;&lt;br /&gt;
      &lt;strong&gt;bold&lt;/strong&gt;&lt;br /&gt;
      &lt;strong&gt;&lt;em&gt;bold italics&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;
      interesting, using certain text formatting triggers a &amp;lt;br&amp;gt; instead of &amp;lt;p&amp;gt;&lt;br /&gt;
      angle brackets are escaped :)&lt;/p&gt;
      &lt;ul&gt;
      &lt;li&gt;list item&lt;ul&gt;
      &lt;li&gt;code (meh)&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/li&gt;
      &lt;/ul&gt;
      &lt;p&gt;edit #12345&lt;br /&gt;
      &lt;a href=&quot;//wiki.musicbrainz.org/Edit_Note&quot;&gt;Edit_Note&lt;/a&gt;&lt;br /&gt;
      &lt;a href=&quot;https://musicbrainz.org/&quot; rel=&quot;nofollow&quot;&gt;formatted URL&lt;/a&gt;&lt;br /&gt;
      &lt;a href=&quot;https://musicbrainz.org/&quot; rel=&quot;nofollow&quot;&gt;https://musicbrainz.org/&lt;/a&gt; (unformatted)&lt;/p&gt;
      &lt;p&gt;why not follow musicbrainz.org :(&lt;/p&gt;
      &lt;p&gt;And now the fix:&lt;br /&gt;
      &amp;#61; h1 &amp;#61;&lt;/p&gt;
      &lt;p&gt;didn&#x27;t work :(&lt;/p&gt;
      &lt;p&gt;Part 2: &lt;a href=&quot;https://musicbrainz.org/collection/edcd60cb-8788-4cf7-9eb6-80e81841ec68&quot; rel=&quot;nofollow&quot;&gt;https://musicbrainz.org/collection/edcd60cb-8788-4cf7-9eb6-80e81841ec68&lt;/a&gt;&lt;/p&gt;
      

      https://musicbrainz.org/collection/edcd60cb-8788-4cf7-9eb6-80e81841ec68

      &#61; h1 &#61;
      &#61;&#61; h2 &#61;&#61;
      &#61;&#61;&#61; h3 &#61;&#61;&#61;
      &#61;&#61;&#61;&#61; h4 &#61;&#61;&#61;&#61;
      &#61;&#61;&#61;&#61;&#61; h5 &#61;&#61;&#61;&#61;&#61;
      &#61;&#61;&#61;&#61;&#61;&#61; h6 &#61;&#61;&#61;&#61;&#61;&#61;
      
      Yay, it no longer breaks. \o/
      
      
          * list item
      
      <p>
               * code (still meh)
      
      edit #12345
      [Edit_Note]
      [https://musicbrainz.org/|formatted URL] why not follow musicbrainz.org :(
      [https://musicbrainz.org/] (brackets)
      https://musicbrainz.org/ (unformatted)
      
      So, what was breaking stuff? Text formatting like headings, bold, italics and horizontal rule.
      Try it out.

       Page source:

      <p>= h1 =<br/>
      == h2 ==<br/>
      === h3 ===<br/>
      ==== h4 ====<br/>
      ===== h5 =====<br/>
      ====== h6 ======</p>
      <p>Yay, it no longer breaks. \o/</p>
      <ul>
      <li>list item</li>
      </ul>
      <p>&lt;p&gt;</p>
      <ul>
      <li>code (still meh)</li>
      </ul>
      <p>edit #12345<br/>
      <a href="//wiki.musicbrainz.org/Edit_Note">Edit_Note</a><br/>
      <a href="https://musicbrainz.org/" rel="nofollow">formatted URL</a> why not follow musicbrainz.org :(<br/>
      <a href="https://musicbrainz.org/" rel="nofollow">https://musicbrainz.org/</a> (brackets)<br/>
      <a href="https://musicbrainz.org/" rel="nofollow">https://musicbrainz.org/</a> (unformatted)</p>
      <p>So, what was breaking stuff? Text formatting like headings, bold, italics and horizontal rule.<br/>
      Try it out.</p>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              chaban chaban
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Packages

                Version Package