Page 1 of 1

Special characters on titles when prinitng Browse Form

Posted: Tue Mar 15, 2016 8:16 pm
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

Re: Special characters on titles when prinitng Browse Form

Posted: Wed Nov 16, 2016 7:08 am
by luishirata1979
:D :D :D :D :D
thanks a lot