Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

Special characters on titles when prinitng Browse Form

Post Reply
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Special characters on titles when prinitng Browse Form

Unread post by Fike »

When prinitng a browse form with titles that include special characters (accented letters) these are removed by the following line contained in the nuBuildTable function of the nuapi.php file:

Code: Select all

$nuObject->title  = trim(preg_replace("/[^0-9a-zA-Z _]/", "", $R->sbr_title));
So I made the following modification to include accented letters:

Code: Select all

$nuObject->title  = trim(preg_replace("/[^0-9a-zA-ZÑñáéíóúÁÉÍÓÚüÜ _]/", "", $R->sbr_title));
Lastly, I added the header tags inside the $h variable of nurunprintbrowse.php file like this:

Code: Select all

$h .=  "

<html>
<head>
<meta http-equiv='Content-type' content='text/html;charset=UTF-8'>
<style>


table    {border-width:1px;border-style:solid;border-color:grey}
tr       {border-width:1px;border-style:solid;border-color:grey}
th       {border-width:1px;border-style:solid;border-color:grey;background-color:lightgrey}
td       {border-width:1px;border-style:solid;border-color:grey}
.id      {border-width:0px;border-style:none;width:1px;font-size:0px}
$style


</style>
</head>
<body>

$table

</body>
</html>
And now it's working fine. Hope it helps.

Kind regards
luishirata1979
Posts: 3
Joined: Sun Jul 26, 2015 7:17 am

Re: Special characters on titles when prinitng Browse Form

Unread post by luishirata1979 »

:D :D :D :D :D
thanks a lot
Post Reply