-
-// Format event location in pure text
-function formatEventLocationText(location) {
- // Friendica can store the event location as text or as html
- // We need to check if the location is html. In this case we need
- // to transform it into clean text
- if (location.startsWith("<div")) {
- var locationHtml = $.parseHTML( location );
- var eventLocationText = locationHtml[0]['innerText'];
- } else {
- var eventLocationText = location.replace("<br>", " ");
- };
-
- return eventLocationText;
-}
\ No newline at end of file