diff --git a/src/addon/mod/data/providers/helper.ts b/src/addon/mod/data/providers/helper.ts
index a7626f4f7..d5be5fa19 100644
--- a/src/addon/mod/data/providers/helper.ts
+++ b/src/addon/mod/data/providers/helper.ts
@@ -602,7 +602,7 @@ export class AddonModDataHelperProvider {
template = this.domUtils.fixHtml(template);
// Add core-link directive to links.
- template = template.replace(/]*href="[^>]*)>/i, (match, attributes) => {
+ template = template.replace(/]*href="[^>]*)>/ig, (match, attributes) => {
return '';
});