Testtags problem with metar weatherreport tag

Hello,

Today I discovered the following error on my page.
At the ajax-dashboard the tag $weatherreport is displayed. Bud i think my Metar station is placing a enter in the value.

The file testtags.php displayed the following

$weatherreport =  'obscured
 -  fog';	// current weather conditions from selected METAR

Which result in the following condition on my page

Dry, Obscured -

Is there something i can do to fix this ?

With kind regards,
Maurice

Hi Maurice,

The WD tag %weatherreport% is returning an embedded new-line character in the string as it uploads testtags.php to your site.

You can filter it out with a change to testtags.txt from

$weatherreport =  '%weatherreport%';	// current weather conditions from selected METAR

to

$weatherreport =  '%weatherreport%';	// current weather conditions from selected METAR
$weatherreport = preg_replace('|\n|is','',$weatherreport);

Best regards,
Ken

Tanks Ken,
I will add it to the sourcefile testtags.txt