Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Enabling the "BLS Filter" for a text format results in the adding of an extra space (" ") after each HTML tag.
I have tracked the issue down to an extra space being added in the _bible_blsanchorize
function, and involves changing a single line:
- $linked_text .= ' '. _bible_blsaddLink($value);
+ $linked_text .= _bible_blsaddLink($value);
Here is the original while loop:
while (list($key,$value) = each($parsed_text)) {
if (preg_match($split_regex, $value)) {
$linked_text .= $value; // If it is an HTML element or within a link, just leave it as is.
}
else {
$linked_text .= ' '. _bible_blsaddLink($value);
}
}
Here is the modified while loop.
while (list($key,$value) = each($parsed_text)) {
if (preg_match($split_regex, $value)) {
$linked_text .= $value; // If it is an HTML element or within a link, just leave it as is.
}
else {
$linked_text .= _bible_blsaddLink($value);
}
}
I'm not sure why the extra whitespace is included in the function, as it doesn't seem to break anything for me by removing it. I don't have any texts being referenced in any content at the moment, but I might in the near future which is why I have the filter enabled.
Comments
Comment #1
berenddeboer CreditAttribution: berenddeboer commentedCould have created a nice patch for this!