Skip to content

URL field can't be displayed asHtml #4948

@kichetof

Description

@kichetof
  • Laravel Version: 9.36.1
  • Nova Version: 4.16.1
  • PHP Version: 8.1.11
  • Database Driver & Version: Sail mysql
  • Operating System and Version: macOS Sail
  • Browser type and version: Brave

Description:

I would like to display an URL field with custom html, and it doesn't work as expected.

URL field display the name of the field instead of the custom html:

Capture d’écran 2022-10-19 à 09 06 50

If you replace URL by Text field, custom html are correctly displayed.

Detailed steps to reproduce the issue on a fresh Nova installation:

URL::make('test URL', function () {
    return '<a href="https://laravel.com">laravel.com</a>';
})->asHtml(),

Text::make('test TEXT', function () {
    return '<a href="https://laravel.com">laravel.com</a>';
})->asHtml(),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions