diff --git a/Mohem/config.xml b/Mohem/config.xml
index 5ad4f1b7..f907a637 100644
--- a/Mohem/config.xml
+++ b/Mohem/config.xml
@@ -4,8 +4,8 @@
an app created by cloud Solutions
Cloud Solutions
-
+
diff --git a/Mohem/resources/android/xml/network_security_config.xml b/Mohem/resources/android/xml/network_security_config.xml
index f9fecaf7..14144c66 100644
--- a/Mohem/resources/android/xml/network_security_config.xml
+++ b/Mohem/resources/android/xml/network_security_config.xml
@@ -2,5 +2,6 @@
localhost
+ hmg.com
\ No newline at end of file
diff --git a/Mohem/src/app/offersdiscount/home/home.component.html b/Mohem/src/app/offersdiscount/home/home.component.html
index b84354f8..678dc3e8 100644
--- a/Mohem/src/app/offersdiscount/home/home.component.html
+++ b/Mohem/src/app/offersdiscount/home/home.component.html
@@ -54,7 +54,8 @@
-
+
+
{{item.Title}}
{{item.Title_AR}}
diff --git a/Mohem/src/app/offersdiscount/home/home.component.ts b/Mohem/src/app/offersdiscount/home/home.component.ts
index 8ee773ac..354daa36 100644
--- a/Mohem/src/app/offersdiscount/home/home.component.ts
+++ b/Mohem/src/app/offersdiscount/home/home.component.ts
@@ -39,6 +39,7 @@ export class HomeComponent implements AfterViewInit {
public cs: CommonService,
public offersService: OfferDiscountService,
public route: ActivatedRoute,
+ private sanitizer: DomSanitizer
) {
this.route
@@ -218,4 +219,9 @@ export class HomeComponent implements AfterViewInit {
}, 1000);
}
}
+
+ sanitize(img) {
+ return this.sanitizer.bypassSecurityTrustUrl(img);
+ }
+
}
diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html
index 1d9c3d44..dfb21ae9 100644
--- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html
+++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.html
@@ -14,7 +14,7 @@
+ [src]="sanitize(details.Banner_Image)">
{{details.Title}}
@@ -69,8 +69,8 @@
-
-
+
+
{{item.Title}}
diff --git a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts
index ee364abe..8a4df9c1 100644
--- a/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts
+++ b/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts
@@ -3,6 +3,7 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { OfferDiscountService } from '../services/service';
import { SocialSharing } from '@ionic-native/social-sharing/ngx';
+import { DomSanitizer } from '@angular/platform-browser';
@Component({
selector: 'app-offer-details',
templateUrl: './offer-details.component.html',
@@ -12,7 +13,7 @@ export class OfferDetailsComponent implements OnInit {
public details: any;
public direction: String;
public related: any;
- constructor(public ts: TranslatorService, private socialSharing: SocialSharing, public cs: CommonService, public offersService: OfferDiscountService) { }
+ constructor(public ts: TranslatorService, private socialSharing: SocialSharing, public cs: CommonService, public offersService: OfferDiscountService, private sanitizer: DomSanitizer) { }
ngOnInit() {
this.direction = TranslatorService.getCurrentDirection();
@@ -68,4 +69,8 @@ export class OfferDetailsComponent implements OnInit {
this.openLocation();
})
}
+ sanitize(img) {
+ return this.sanitizer.bypassSecurityTrustUrl(img);
+ }
+
}