Posted by kotnik on November 28, 2011 at 3:38pm
9 followers
| Project: | Drush |
| Version: | All-versions-5.x-dev |
| Component: | Make |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Noticed this while playing with #1268416: Destination directory .../drupal-7.9 already exists..
Drush up gives me output like this:
Checking available update data ...
Checked available update data for <em class="placeholder">Administration menu</em>.It should look saner:
Checking available update data ...
Checked available update data for Administration menu.Patch attached below.
Comments
#1
Patch attached.
#2
Please provide more detail. Drupal7 tries not to print html in its errors. What code is doing thle placeholder?
#3
Unfortunately it still does leak HTML if it's batching. Code that outputs HTML is here, %placeholder returns HTML as you can see here.
#4
Maybe we need to add strip_tags to $value in includes/batch.inc?
class DrushBatchContext extends ArrayObject {function offsetSet($name, $value) {
if ($name == 'message') {
drush_log($value, 'ok');
}
elseif ($name == 'error_message') {
drush_set_error('DRUSH_BATCH_ERROR', $value);
}
parent::offsetSet($name, $value);
}
}
#5
(Only add strip_tags to the parameter $value as passed to drush_log and drush_set_error; do not perturb parent:offsetSet.)
#6
Greg, you are right, this is better place to do it. Patch attached.
#7
Patch in #6 works :)
(Tested with
drush upcommand).#8
committed to master. seems safe for 4.x but does not apply cleanly.
#9
Set status.
#10
Batching approach changed in #687724: 'multithreaded' updatedb for better memory consumption and there is no need for this patch for 4.x, since there are no issues there with HTML output.
#11
Sounds right to me.
#12
What if instead calling strip_tags() all the time, we used
dt()?#13
Not going to translate arbitrary strings. Drupal doesn't do that either.
#14
The reason I bring that up is because this looks kind of silly.
#15
Ah, I understand. This is the same issue, but occurring in different places. I'm running into HTML being outputted when running through Drush Make's download factory. I think we have two options here...
I think I prefer the #2 checkplainInsteadOfEm.patch approach more. Let's use @ instead of % for those dt() calls.
#16
I agree that #2 is preferable.
#17
Committed.
#18
Automatically closed -- issue fixed for 2 weeks with no activity.
#19
I still see this with Drush 5.1:
$ drush urol "administrator" --uid=2Added the <em class="placeholder">administrator</em> role to uid <em class="placeholder">2</em> [success]
#20
Please use latest dev snapshot before reporting bugs. That might be fixed already. If still broken, feel free to reopen.
#21
My mistake, I did not see that this thread was related to Drush Make. This is an issue when using core commands. I'll open another issue.