This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-website.git

commit 5d95fc1fb664fe84d0b1909c68119f5ddc450990
Author: Zoran Regvart <[email protected]>
AuthorDate: Wed Feb 17 11:05:03 2021 +0100

    chore: remove markup breadcrumb microdata
    
    This adds `remove_markup` helper to remove any HTML markup from given
    text, and applies it to the breadcrumb microdata's `name` value as the
    Camel Kamelets Catalog contains HTML markup due to inclusion of the
    image in the title of catalog items.
---
 antora-ui-camel/src/helpers/remove_markup.js           | 3 +++
 antora-ui-camel/src/partials/breadcrumbs-microdata.hbs | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/antora-ui-camel/src/helpers/remove_markup.js 
b/antora-ui-camel/src/helpers/remove_markup.js
new file mode 100644
index 0000000..1d8a1a5
--- /dev/null
+++ b/antora-ui-camel/src/helpers/remove_markup.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = (text) => text.replace(/<[^>]*>/g, '').trim()
diff --git a/antora-ui-camel/src/partials/breadcrumbs-microdata.hbs 
b/antora-ui-camel/src/partials/breadcrumbs-microdata.hbs
index 2c5badb..4e12939 100644
--- a/antora-ui-camel/src/partials/breadcrumbs-microdata.hbs
+++ b/antora-ui-camel/src/partials/breadcrumbs-microdata.hbs
@@ -26,7 +26,7 @@
         {
         "@type": "ListItem",
         "position": {{add @index 4}},
-        "name": "{{{ ./content }}}",
+        "name": "{{{remove_markup ./content }}}",
         {{~#if (and ./url (eq ./urlType 'internal'))~}}
         "item": "https://camel.apache.org{{{./url}}}";
         {{~else~}}

Reply via email to