Por que o QR Generator não fornece o URL correto na imagem QR gerada?

Estou usando o QR Generator e a API do Google para isso. Estou gerando um código QR com uma URL ou podemos dizer um link para um site no código QR. O link está correto quando eu imprimi-lo Mas o problema é que, quando eu o passo para o gerador QR, o link não está correto. O link correto é assim. (http: //localhost/crs/web/index.php/birthPublicSearch/birthCertificate/view/cert/B/MTc5OQ%3D%3D) Mas no QR Code Os caracteres após / MTC5OQ não são exibidos no link significa que% 3D%% 3D não é exibido na imagem QR. Alguém pode me ajudar nisso. Abaixo está o meu código. O outro problema também é que, quando eu redireciono para o URL que codifica a imagem usando meu telefone celular, as barras no URL mudam para% 2F e o URL não abre e uma mensagem de agradecimento é exibida pelo uso do Neo Reader. Como posso resolver isso.

<?php
class QRGenerator { 
protected $size; 
protected $data; 
protected $encoding; 
protected $errorCorrectionLevel; 
protected $marginInRows;
protected $debug; 

public function __construct($data,$size='100',$encoding='UTF-8',$errorCorrectionLevel='L',$marginInRows=4,$debug=false) { 

    $this->data=urlencode($data); 
    $this->size=100;
    $this->encoding=($encoding == 'Shift_JIS' || $encoding == 'ISO-8859-1' || $encoding == 'UTF-8') ? $encoding : 'UTF-8'; 
    $this->errorCorrectionLevel=($errorCorrectionLevel == 'L' || $errorCorrectionLevel == 'M' || $errorCorrectionLevel == 'Q' || $errorCorrectionLevel == 'H') ?  $errorCorrectionLevel : 'L';
    $this->marginInRows=($marginInRows>0 && $marginInRows<10) ? $marginInRows:4; 
    $this->debug = ($debug==true)? true:false;     
} 
public function generate(){ 

    $QRLink = "https://chart.googleapis.com/chart?cht=qr&chs=".$this->size."x".$this->size.                 
               "&chl=" . $this->data .  
               "&choe=" . $this->encoding . 
               "&chld=" . $this->errorCorrectionLevel . "|" . $this->marginInRows; 
if ($this->debug) echo $QRLink;          
return $QRLink;} } ?>

E o TD no qual estou imprimindo o código QR é como:

<td align="center" valign="top">
    <div style="float: left; margin-left: -230px; margin-top: 34px; padding-right: 20px;">
     <script type="text/javascript">                                                                            
       (function() {
         var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
          po.src = 'https://apis.google.com/js/plusone.js';
          var s = document.getElementsByTagName('script')[0];     
          s.parentNode.insertBefore(po, s);
     });
      </script>
  </div>                                                   
<?php


$unique_value = base64_encode($birhtId);// Unique Value is MTc5OQ

$data='localhost/web/index.php/birthPublicSearch/birthCertificate/view/cert/B/'.$unique_value.'%3D%3D';
$size='200';
$ex1 = new QRGenerator($data,$size); 
$img1 = "<img src=".$ex1->generate().">";
$content ='<table>
    <tr>
         <td colspan="2">'.$img1.'</td>
    </tr>                                                                     
  </table>';                                                         
    print_r($content);
?>
</td>

questionAnswers(2)

yourAnswerToTheQuestion