Using html in push notification:

I’d like to use html in my push notifications, but I’m having a hard time with using them inside and outside of my app. If I use this message send notification format:

var payload = {
        "title": "MyApp",
        "emails": user@user.com,    <-- I'm using ionic push
        "profile": "push_notification",
        "notification": {
          "message": notificationMsg,  <-- html inserted here
          "android": {
            "title": notifType,
            "payload": { data }
          },
          "ios": {
            "title": notifType,
            "badge": number + 1,  
            "payload": { data }
          }
        }
      }

and I load the message as so:

      var notificationMessage = this.currentUser.split('@')[0] + " made a request! \n"
        + start_time
        + "\nTo: \n"
        + end_time

It looks fine when it comes in as a background notification (i.e. the app is close) but it looks boring when opened in the app.

So, to remedy this, I made the following:

      var htmlMessage = `<p>` + this.currentUser.split('@')[0] + `made a request!</p>
                                 <p>` + start + `</p>
                                 <p>To: </p>
                                 <p>` + end +  `</p>`

And it looks great in-app, but for the background “closed-app” notification the html is visible. (i.e., the <p>, etc is not interpreted and is instead printed directly into the message.

How do you use html within push notification for in-app, and regular text for background notification?