Special characters on titles when prinitng Browse Form

Special characters on titles when prinitng Browse Form

Postby Fike » Wed Mar 16, 2016 4:46 am

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
Fike
 
Posts: 79
Joined: Fri Oct 21, 2011 4:43 am

Re: Special characters on titles when prinitng Browse Form

Postby luishirata1979 » Wed Nov 16, 2016 3:38 pm

:D :D :D :D :D
thanks a lot
luishirata1979
 
Posts: 3
Joined: Sun Jul 26, 2015 2:47 pm


Return to General



cron