Fix WhatsApp links/numbers
Our links would work after opening WhatsApp, but not render e.g. known business names associated with the number on the intermediate page that you open the app or web app from
This commit is contained in:
@@ -232,7 +232,7 @@ export default class PlaceDetails extends Component {
|
||||
return htmlSafe(
|
||||
parts
|
||||
.map((p) => {
|
||||
const safeTel = p.replace(/[\s-]+/g, '');
|
||||
const safeTel = p.replace(/[\s()+.-]/g, '');
|
||||
return `<a href="https://wa.me/${safeTel}" target="_blank" rel="noopener noreferrer">${p}</a>`;
|
||||
})
|
||||
.join('<br>')
|
||||
|
||||
Reference in New Issue
Block a user