Skip to Main Content
Feature Request FR-4428
Product Area APIs
Status CLOSED

1 Voters

Support HTML tag in apex.message

pkpanda Public
· Apr 25 2025

Idea Summary
Support HTML tag inside the apex.message.* function. Currently this is working if use a DA as Alert or Confirm but if you use Java script then it display the tags on the message.

Use Case

var info = apex.item("P1_PROMPT_ALERT").getValue();
var title = $v('P1_ALERT_TITLE');
var summary = $v('P1_ALERT_SUMMARY');
var act = $v('P1_ALERT_ACTION');

apex.message.confirm( summary+"\n"+info+"\n" +"<strong>"+act+"</strong>", function( okPressed ) {
if( okPressed ) {
window.location.reload();
}
else{
apex.navigation.dialog.close(true);
} }
, {
title: title,
style: "warning",
cancelLabel: "Cancel",
confirmLabel: "Get Data"
} );

https://forums.oracle.com/ords/apexds/post/apex-message-confirm-showing-html-tag-in-confirm-alert-5480

This is a great idea! You can already achieve this in APEX today with a slightly different approach.

Comments

Comments

  • neil.fernandez APEX Team OP 3 months ago

    This is currently supported but not documented. We will update the docs.

    https://docs.oracle.com/en/database/oracle/apex/24.2/aexjs/apex.message.html#.confirm

    The **pOptions** param has a property named unsafe.

    The message will be escaped unless options.unsafe is set to false.

    Simple working example:

    apex.message.confirm( "Are you sure? <br> <span>test</span>", function(){},{"unsafe": false});
    
  • pkpanda OP 2 months ago

    I have tried with apex.message.alert and confirm using <strong> and it didn't work it only work with showerror.

  • neil.fernandez APEX Team OP 2 months ago

    @pkpanda copy and paste my code. I tested it. It works. Did you not use my unsafe false flag?