diff --git a/src/app/components/stream/status/databinded-text/databinded-text.component.spec.ts b/src/app/components/stream/status/databinded-text/databinded-text.component.spec.ts
index ed6d7ebc..957b5fda 100644
--- a/src/app/components/stream/status/databinded-text/databinded-text.component.spec.ts
+++ b/src/app/components/stream/status/databinded-text/databinded-text.component.spec.ts
@@ -148,5 +148,12 @@ describe('DatabindedTextComponent', () => {
component.text = sample;
expect(component.processedText).toContain('
Bla cloudblogs.microsoft.com/opens
');
- })
+ });
+
+ it('should parse link 2 - Pleroma', () => {
+ const sample = `Bla
https://link/`;
+
+ component.text = sample;
+ expect(component.processedText).toContain('Bla
https://link/');
+ });
});
\ No newline at end of file
diff --git a/src/app/components/stream/status/databinded-text/databinded-text.component.ts b/src/app/components/stream/status/databinded-text/databinded-text.component.ts
index 1dce8924..e4b4c8aa 100644
--- a/src/app/components/stream/status/databinded-text/databinded-text.component.ts
+++ b/src/app/components/stream/status/databinded-text/databinded-text.component.ts
@@ -48,8 +48,8 @@ export class DatabindedTextComponent implements OnInit {
this.processHashtag(section);
}
catch (err) {
- console.warn('process hashtag');
- console.warn(value);
+ console.error('error processing hashtag');
+ console.error(value);
}
} else if (section.includes('class="u-url mention"') || section.includes('class="mention"') || section.includes('class="mention status-link"') || section.includes('class="h-card mention')) {
@@ -57,8 +57,8 @@ export class DatabindedTextComponent implements OnInit {
this.processUser(section);
}
catch (err) {
- console.warn('process mention');
- console.warn(value);
+ console.error('error processing mention');
+ console.error(value);
}
} else {
try {
@@ -66,8 +66,8 @@ export class DatabindedTextComponent implements OnInit {
//this.processedText += `')[1].split('')[0];
} catch (err) { // Pleroma
- extractedName = extractedLinkAndNext[0].split('')[1].split('')[0];
+ try {
+ extractedName = extractedLinkAndNext[0].split('')[1].split('')[0];
+ } catch (err) {
+ extractedName = extractedLinkAndNext[0].split('">')[1];
+ }
}
}
}