Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: IonicSafeString not accepted even after setting innerHTMLTemplatesEnabled to true in Ionic Config #30111

Open
3 tasks done
anita-park opened this issue Jan 6, 2025 · 1 comment
Labels

Comments

@anita-park
Copy link

anita-park commented Jan 6, 2025

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

Toast has been created with message that should be recognised as HTML, but is shown as undefined even though the ionic config IonicModule.forRoot({ innerHTMLTemplatesEnabled: true }),
has been correctly set.

Current behaviour is:
image

I have tried v7, v8, both raising same issues

I saw similar issues that have been closed, and I could still not resolve this, even with the ion config being set so I am confused :(

Expected Behavior

Expected Behaviour should be, the tags should not be shown as plain string in the toast, and shown as a link instead, and not undefined like the current behaviour.

Steps to Reproduce

Click on any of the buttons in the stackblitz, and you will see the message is undefined instead of a string. (i tried to reproduce what I am seeing in my application in here)

Code Reproduction URL

https://stackblitz.com/edit/y3vm6fxl-8swrizca?file=src%2Fapp%2Fexample.component.ts

Ionic Info

Ionic:

Ionic CLI : 5.4.16 (C:\Users....)
Ionic Framework : not installed
@angular-devkit/build-angular : 16.2.16
@angular-devkit/schematics : 16.2.12
@angular/cli : 16.2.12
@ionic/angular-toolkit : 10.0.0

Utility:

cordova-res : not installed
native

System:

NodeJS : v18.20.4 (C:\Program Files\nodejs\node.exe)
npm : 10.1.0
OS : Windows 10

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Jan 6, 2025
@anita-park
Copy link
Author

Trying to use import { IonicSafeString } from '@ionic/angular/standalone'; has not helped it seems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant