- Add '"' to special text format,

- Minor JSON fix.
This commit is contained in:
2019-10-07 18:04:53 +02:00
parent 286ff7a80e
commit 2d8ad0c05b

View File

@@ -42,7 +42,7 @@ $time_start = microtime_float();
include "lmbrowse_config.inc";
$lmb_myname="LMBrowse";
$lmb_tag_tab=explode( " ", "\$Name: lmbrowse-1_6_0-1 $");
$lmb_tag_tab=explode( " ", "\$Name: lmbrowse-1_6_1-1 $");
$lmb_tag_tab=explode( "-", $lmb_tag_tab[1]);
$lmb_myver=strtr( "$lmb_tag_tab[1]-$lmb_tag_tab[2]", "_", ".");
@@ -397,6 +397,7 @@ function lmb_xml_text_format( $input_text)
{
$search_tab = array(
"&",
"\"",
"\n",
"< >",
"<br/>",
@@ -418,6 +419,7 @@ function lmb_xml_text_format( $input_text)
$replace_tab = array(
"&amp;",
"&quot;",
"\n ",
"",
"\n",
@@ -997,31 +999,28 @@ function lmb_news_json_ld( $news_tab)
echo "<script type=\"application/ld+json\"> {
\"@context\": {
\"ical\": \"http://www.w3.org/2002/12/cal/ical#\",
\"xsd\": \"http://www.w3.org/2001/XMLSchema#\",
\"ical:dtstart\": {
\"@type\": \"xsd:dateTime\"
}
\"xsd\": \"http://www.w3.org/2001/XMLSchema#\"
},
";
if( "{$news_tab[$i]["news"]}" == "")
{
echo " \"ical:summary\": \"{$news_tab[$i]["title"]}: {$news_tab[$i]["name"]}\",
\"ical:description\": \"{$news_tab[$i]["title"]}: {$news_tab[$i]["name"]}\",
echo " \"ical:summary\": \"".lmb_xml_text_format( "{$news_tab[$i]["title"]}: {$news_tab[$i]["name"]}")."\",
\"ical:description\": \"".lmb_xml_text_format( "{$news_tab[$i]["title"]}").": ".lmb_xml_text_format( "{$news_tab[$i]["name"]}")."\",
\"ical:url\": \"{$news_tab[$i]["alink"]}\",
\"ical:attach\": \"{$news_tab[$i]["aimg"]}\",
";
}
else
{
echo " \"ical:summary\": \"{$news_tab[$i]["title"]}\",
\"ical:description\": \"{$news_tab[$i]["news"]}\",
echo " \"ical:summary\": \"".lmb_xml_text_format( "{$news_tab[$i]["title"]}")."\",
\"ical:description\": \"".lmb_xml_text_format( "{$news_tab[$i]["news"]}")."\",
\"ical:url\": \"http://www.langueur-monotone.com/\",
\"ical:attach\": \"http://www.langueur-monotone.com/skin/images/lm-logo2-96.png\",
";
}
echo " \"ical:dtstart\": \"{$news_tab[$i]["date"]}\"
echo " \"ical:dtstart\": \"{$news_tab[$i]["date"]}\"
}</script>
";