Problem/Motivation
See #2566503: [meta] Replace remaining !placeholder for Non-URL HTML outputs only
modules/syslog/syslog.module: $output .= '<p>' . t("The Syslog module logs events by sending messages to the logging facility of your web server's operating system. Syslog is an operating system administrative logging tool that provides valuable information for use in system management and security auditing. Most suited to medium and large sites, Syslog provides filtering tools that allow messages to be routed by type and severity. For more information, see the <a href='!syslog'>online documentation for the Syslog module</a>, as well as PHP's documentation pages for the <a href='!php_openlog'>openlog</a> and <a href='!php_syslog'>syslog</a> functions.", array('!syslog' => 'https://www.drupal.org/documentation/modules/syslog', '!php_openlog' => 'http://www.php.net/manual/function.openlog.php', '!php_syslog' => 'http://www.php.net/manual/function.syslog.php')) . '</p>';
modules/syslog/syslog.module: '#description' => t('Specify the format of the syslog entry. Available variables are: <dl><dt><code>!base_url
Base URL of the site.
!timestamp
Unix timestamp of the log entry.
!type
The category to which this message belongs.
!ip
IP address of the user triggering the message.
!request_uri
The requested URI.
!referer
HTTP Referer if available.
!uid
User ID.
!link
A link to associate with the message.
!message
The message to store in the log.
'),
Proposed resolution
Remaining tasks
Agree that removing HTML support makes sense.
User interface changes
None
API changes
Date format strings no longer support adding HTML using the \ escape character.
Data model changes
None
Beta phase evaluation
Reference: https://www.drupal.org/core/beta-changes
| Issue category |
Bug because at the moment date formats support HTML but it is escaped |
| Issue priority |
Major because part of the critical to remove !placeholder |
| Disruption |
Disruptive for existing sites that are adding HTML to date formats. If HTML is required in a formatted date then the site should implement a custom field formatter to do this. |
Comments
Comment #2
dawehnerComment #3
dawehnerComment #4
tom verhaeghe commentedComment #5
tom verhaeghe commentedNot sure if this patch makes sense, but here's my attempt. All of the variables passed on by the syslog function are preceded with @ now instead of an exclamation mark.
Comment #6
tom verhaeghe commentedForgot to alter a test in the migrate_drupal module that refers to this change. This will probably make the test fail :-)
Comment #9
tom verhaeghe commentedComment #10
tom verhaeghe commentedComment #11
dawehnerThat feels a bit iffy but it doesn't cause double escaping due to the strip_tags(), right? What happens with a quote in @link or @message?
Comment #12
alexpottI'm not convinced about this change. Since the !placeholder vs @placeholder is irrelevant here - we are calling
strtr()notSafeMarkup::format()ort().I think this is closed won't fix.
Comment #13
dawehnerIMHO its a best practise now, as otherwise it would add a bit of confusion.
Comment #14
alexpottSo if we do this then we have to fix the migration.
Making this change is wrong.
Comment #15
cosmicdreams commented@alexpott, for my education: Why is that change wrong?
Comment #16
alexpottBecause that is the Drupal 7 default value and we're testing how we migrate that to drupal 8.
Comment #17
stefan.r commentedWhat about this one - we still use !variable here but I assume this is something else entirely as we don't pass in an argument?
Comment #18
stefan.r commentedOK so that is used in strtr() only. Seems this has nothing to do with the parent so this is at best not critical and probaby just a won't fix, as I don't see how using @ instead of ! there is less confusing?
Comment #19
stefan.r commentedComment #22
alexpottIt is also not a bug.
Comment #23
joelpittetThis needs to happen or we'll have some serious problems with 8.0.0 #2575703: Remove default fall-through from PlaceholderTrait::placeholderFormat()
It's now a bug:

Comment #24
joelpittetWhoops, that was coming from devel module.
Comment #25
alexpottI think there is no point changing the syslog format. It is not the same thing as the placeholders for FormattableMarkup cause it is not markup.
Comment #26
alexpott