Fix (enable) GLPI 0.84.8 Inline knowledgebase images.
For some reason the in-line images keep getting blocked in GLPI. I think database cluttering is the main reason for this. I still think they should make it optional. But hey, who am i to tell INDEPNET whats right🙂
Enabling (Fixing) the images has become a bit more complex in comparison with my previous post. So, i cant be held responsible for any issues that might affect you after you followed this article. In my environment it works without any issues.
- Again, configure htmlAwed to accept data: in the src: schema.
- Open the htmlAwed lib with your favorite editor. The file is located at: GLPI_ROOT/lib/htmlawed/htmlawed.php
- Locate line 47.
- make the end of the line look like this:
t; *:file, http, https; src: data';
- For some reason the ‘denied:’ part in ‘src=’denied:data:image/png;base64…’ is saved in the database. Because of this the ‘denied’ portion still turns up in the content (not because of htmlAwed). You can easily fix this by running the following SQL statement in your TEST database.
update glpi_knowbaseitems set answer =REPLACE(answer, 'denied:', ''); Query OK, 12 rows affected (0.29 sec) Rows matched: 284 Changed: 12 Warnings: 0
If all is well, the images should again be displayed in your knowledge base.
Tiny MCE will accept the inline images (inserted from the clpiboard with greenshot) and will display them correctly…
Got any remarks or tips, let me know🙂