Problem/Motivation

With "Advanced HTML/Text" field, richtext editor enabled, when I upload an inline-image, the field is stored in temporary mode in database. When cron task is enabled, the file is deleted when core detects the defined temporary time file is reached.

Comments

Florent Jousseaume created an issue. See original summary.

jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new1.31 KB
Florent Jousseaume’s picture

StatusFileSize
new1.34 KB

Hi !

I have a problem with your patch. Values are double quoted (\"file\" for example), so comparison between 'file' and '\"file\"' does not work. The UUID has the same problem, so I added a trim for each value. I don't know if it is a good practice, but I did not see something like that in DomXXXX class.

jrockowitz’s picture

+++ b/includes/webform.editor.inc
@@ -238,12 +238,27 @@ function _webform_parse_file_uuids($text) {
+      $img = str_replace('\\\\\"', '"', $img);

Can we improve this cleanup code instead of fixing the attributes?

Florent Jousseaume’s picture

StatusFileSize
new1.31 KB

Sorry... I just looked to the values... here is a new version.

jrockowitz’s picture

StatusFileSize
new652 bytes
new1.42 KB

Of course, now I see that "there is a PHP function for that".

@see stripslashes()

Florent Jousseaume’s picture

StatusFileSize
new1.41 KB

Hello, it seems OK for me, after testing it on my local environment.
I just modified the comment before stripslahes() methods.

jrockowitz’s picture

Status: Needs review » Fixed

@Florent Jousseaume Thanks for the help.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Chetanac’s picture

This file is for webfom 6.0.3 .