mmd-osm left a comment (openstreetmap/openstreetmap-website#6192)
I think I need a DOMParser for this task. Something like:
```javascript
let parser = new DOMParser();
let doc = parser.parseFromString(detailMessage, 'text/html');
detailMessage = doc.body ? doc.body.textContent.trim() : "(unknown)";
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6192#issuecomment-3095737659
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6192/c3095737...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev