When i send newsletter in textmode, the title in the body have many dashes, example:
-------- TEST1
------------------------------------

How can i remove it?

Thanks.

Comments

daneyuleb’s picture

Would like to know this as well--using "simplenews-newsletter-body.tpl.php" to remove title, but that pesky "-----" is embedded in the body var, and not easily finding out where in the code it's inserted. Thanks!
-Daneyul

guru81’s picture

daneyuleb: Thanks for reply! If the "-----" is embedded in the body var, i can substitute it in simplenews-newsletter-body.tpl.php, whith a specific function.

guru81’s picture

Hello,
i used this:

$title_clear = str_replace("------------------------------------"," ",$title);
$$title_clear = str_replace("--------"," ",$title_clear);
print $title_clear; 

But not working. Are you sure that "-----" is embedded in the body?

simon georges’s picture

daneyuleb’s picture

Oops. My bad--I had commented out the "print $title" in the simplenews-newsletter-body.tpl.php. Since the "-----"s still appeared, I'd assumed they were embedded in the only remaining var, $body.

Looking a bit closer this morning, I see it's really the "drupal_html_to_text" function that's getting called in the module's simplenews_html_to_text function that's putting 'em in.

According to the API, drupal_html_to_text converts tabs within any <h2> tags  to "----"s, so I think that's where they're coming from.  (I had left the "<h2>...</h2>" in the template. Doh!)

So...just getting rid of the <h2> tags in "simplenews-newsletter-body.tpl.php" is all that's needed to clear the dashes out.  

-Daneyul

guru81’s picture

Status: Active » Patch (to be ported)

Thank you very much!
Removing h2 tag the problem has been solved.

Regards.

simon georges’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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