Fix when using image into description
This commit is contained in:
parent
4254ad0d33
commit
189323ad58
@ -1175,6 +1175,15 @@ function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hide
|
||||
if (empty($reshook))
|
||||
{
|
||||
$labelproductservice=pdf_getlinedesc($object,$i,$outputlangs,$hideref,$hidedesc,$issupplierline);
|
||||
|
||||
//var_dump($labelproductservice);exit;
|
||||
|
||||
// Fix bug of some HTML editors that replace links <img src="http://localhostgit/viewimage.php?modulepart=medias&file=image/efd.png" into <img src="http://localhostgit/viewimage.php?modulepart=medias&file=image/efd.png"
|
||||
// We make the reverse, so PDF generation has the real URL.
|
||||
$labelproductservice = preg_replace('/(<img[^>]*src=")([^"]*)(&)([^"]*")/', '\1\2&\4', $labelproductservice, -1, $nbrep);
|
||||
|
||||
//var_dump($labelproductservice);exit;
|
||||
|
||||
// Description
|
||||
$pdf->writeHTMLCell($w, $h, $posx, $posy, $outputlangs->convToOutputCharset($labelproductservice), 0, 1, false, true, 'J',true);
|
||||
$result.=$labelproductservice;
|
||||
|
||||
@ -9,6 +9,8 @@ CKEDITOR.editorConfig = function( config )
|
||||
// http://docs.cksource.com/CKEditor_3.x/Developers_Guide
|
||||
// http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html
|
||||
config.enterMode = CKEDITOR.ENTER_BR;
|
||||
//config.forceSimpleAmpersand = true; // When you put a <img src="x?a=a&b=b"> into the textarea, and go into "source", then ckeditor change the & into &. We don't want this. But this option does not fix this.
|
||||
//config.entities = false; // When you put a <img src="x?a=a&b=b"> into the textarea, and go into "source", then ckeditor change the & into &. We don't want this. But this option does not fix this.
|
||||
config.resize_enabled = false;
|
||||
//config.resize_maxHeight = 3000;
|
||||
//config.resize_maxWidth = 3000;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user