# Eliminar guiones de los nombres de etiquetas

**URL:** <https://meta.discourse.org/t/remove-dashes-from-tag-names/285684>\
**Category:** Theme component\
**Tags:** official, tags, remove-tag-dashes\
**Created:** [24 Abril, 2024 08:47 UTC](https://meta.discourse.org/t/remove-dashes-from-tag-names/285684 "2024-04-24T08:47:38Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![eisammy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eisammy/32/528804_2.png) [@eisammy](https://meta.discourse.org/u/eisammy)\
**Post date:** [7 Abril, 2025 22:39 UTC](https://meta.discourse.org/t/remove-dashes-from-tag-names/285684/22 "2025-04-07T22:39:04Z")

</div>

Este script reemplaza este componente por un tiempo

```plaintext
function replaceTextNodes(node) {
    node.childNodes.forEach(child => {
      if (child.nodeType === Node.TEXT_NODE) {
        child.textContent = child.textContent
          .replace(/-E-/gi, ' & ')
          .replace(/-/g, ' ');
      } else {
        replaceTextNodes(child);
      }
    });
  }

  api.onPageChange(() => {

    document.querySelectorAll('.discourse-tag.box').forEach(tag => {
      replaceTextNodes(tag);
    });
    
    document.querySelectorAll('#sidebar-section-content-tags .sidebar-section-link-content-text').forEach(tag => {
      replaceTextNodes(tag);
    });
  });

```

---

_[View the full topic](https://meta.discourse.org/t/remove-dashes-from-tag-names/285684)._
