]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8718 Allow HTML for WS domain description
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Fri, 5 May 2017 15:12:47 +0000 (17:12 +0200)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Tue, 9 May 2017 09:15:45 +0000 (11:15 +0200)
server/sonar-web/src/main/js/apps/web-api/components/Domain.js
server/sonar-web/src/main/js/apps/web-api/components/Menu.js

index 45513d9f9e726e5ec6a31caed3b2478ca19d839d..0c79d15d6b82927359d23adaabc3bbe990ef0d95 100644 (file)
@@ -57,7 +57,11 @@ export default class Domain extends React.PureComponent {
             </span>}
         </header>
 
-        {domain.description && <p className="web-api-domain-description">{domain.description}</p>}
+        {domain.description &&
+          <div
+            className="web-api-domain-description markdown"
+            dangerouslySetInnerHTML={{ __html: domain.description }}
+          />}
 
         <div className="web-api-domain-actions">
           {filteredActions.map(action => (
index 566533c79c7b00936936d56f6d7c44a308f96e49..815cb1d407742b5ecbeb3dff59edf2cf45487a52 100644 (file)
@@ -65,9 +65,11 @@ export default class Menu extends React.PureComponent {
                   {domain.deprecated && <DeprecatedBadge />}
                   {domain.internal && <InternalBadge />}
                 </h3>
-                <p className="list-group-item-text">
-                  {domain.description}
-                </p>
+                {domain.description &&
+                  <div
+                    className="list-group-item-text markdown"
+                    dangerouslySetInnerHTML={{ __html: domain.description }}
+                  />}
               </Link>
             ))}
           </div>