fix: json escaping

master
Jakob 2020-02-26 10:55:10 +01:00
parent 607f274235
commit 2f87827159
1 changed files with 1 additions and 1 deletions

View File

@ -1,3 +1,3 @@
{ {
"NAVBAR":"<?php if (isset($_SESSION['user_id'])){ $login = true;} else { login = false;}?><ul class=\"topnav\"> <li> <?php if ($login){ if ($navbar == \"home\"){ echo \" <a class=\\\"active\\\" href=\\\"%CONTENT_DIR%/userhome/\\\"> <img src=\\\"/common/threadr/img/ThreadR_Home.svg\\\" alt=\\\"My Feed\\\"/> </a> \"; } else { echo \" <a href=\\\"%CONTENT_DIR%/userhome/\\\"> <img src=\\\"/common/threadr/img/ThreadR_Home.svg\\\" alt=\\\"My Feed\\\"/> </a> \"; } } else { if ($navbar == \"home\"){ echo \" <a class=\\\"active\\\" href=\\\"%CONTENT_DIR%/\\\"> <img src=\\\"/common/threadr/img/ThreadR_Home.svg\\\" alt=\\\"Home\\\"/> </a> \"; } else { echo \" <a href=\\\"%CONTENT_DIR%/\\\"> <img src=\\\"/common/threadr/img/ThreadR_Home.svg\\\" alt=\\\"Home\\\"/> </a> \"; } } ?> </li> <li> <?php if ($navbar == \"news\"){ echo \" <a class=\\\"active\\\" href=\\\"%CONTENT_DIR%/news/\\\">News</a> \"; } else { echo \" <a href=\\\"%CONTENT_DIR%/news/\\\">News</a> \"; } } ?> </li> <div class=\"dropdown\"> <button class=\"dropbtn\">Boards</button> <div class=\"dropdown-content\"> <a href=\"%CONTENT_DIR%/boards/\">Board 1</a> <a href=\"#\">Board 2</a> <a href=\"#\">Board 3</a> </div> </div> <li> <?php if ($navbar == \"about\"){ echo \" <a class=\\\"active\\\" href=\\\"%CONTENT_DIR%/about/\\\">About</a> \"; } else { echo \" <a href=\\\"%CONTENT_DIR%/about/\\\">About</a> \"; } } ?> </li> <li class=\"right\"> <?php if ($login) { if ($navbar == \"profile\") { echo \" <a class=\\\"active\\\" href=\\\"%CONTENT_DIR%/profile/\\\">Profile</a> \"; } else { echo \" <a href=\\\"%CONTENT_DIR%/profile/\\\">Profile</a> \"; } } ?> </li> <li class=\"right\"> <?php if ($login) { echo \" <a href=\\\"%CONTENT_DIR%/logout/\\\">Log out</a> \"; } else { if ($navbar == \"login\") { echo \" <a class=\\\"active\\\" href=\\\"%CONTENT_DIR%/login/\\\">Log in</a> \"; } else { echo \" <a href=\\\"%CONTENT_DIR%/login/\\\">Log in</a> \"; } } ?> </li></ul><br />" "NAVBAR":"<?php \r\nif (isset($_SESSION['user_id'])){ \r\n\t$login = true;\r\n} else { \r\n\t$login = false;\r\n}\r\n?>\r\n\r\n<ul class=\"topnav\">\r\n\t<li>\r\n\t\t<?php \r\n\t\t\tif ($login){\r\n\t\t\t\tif ($navbar == \"home\"){\r\n\t\t\t\t\techo \"\r\n\t\t\t\t\t\t<a class=\\\"active\\\" href=\\\"%CONTENT_DIR%\/userhome\/\\\">\r\n\t\t\t\t\t\t\t<img src=\\\"\/common\/threadr\/img\/ThreadR_Home.svg\\\" alt=\\\"My Feed\\\"\/>\r\n\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo \"\r\n\t\t\t\t\t\t<a href=\\\"%CONTENT_DIR%\/userhome\/\\\">\r\n\t\t\t\t\t\t\t<img src=\\\"\/common\/threadr\/img\/ThreadR_Home.svg\\\" alt=\\\"My Feed\\\"\/>\r\n\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\";\r\n\t\t\t\t}\r\n\t\t\t} else { \r\n\t\t\t\tif ($navbar == \"home\"){\r\n\t\t\t\t\techo \"\r\n\t\t\t\t\t\t<a class=\\\"active\\\" href=\\\"%CONTENT_DIR%\/\\\">\r\n\t\t\t\t\t\t\t<img src=\\\"\/common\/threadr\/img\/ThreadR_Home.svg\\\" alt=\\\"Home\\\"\/>\r\n\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo \"\r\n\t\t\t\t\t\t<a href=\\\"%CONTENT_DIR%\/\\\">\r\n\t\t\t\t\t\t\t<img src=\\\"\/common\/threadr\/img\/ThreadR_Home.svg\\\" alt=\\\"Home\\\"\/>\r\n\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t?>\r\n\t<\/li>\r\n <li>\r\n\t\t<?php \r\n\t\t\tif ($navbar == \"news\"){\r\n\t\t\t\t\techo \"\r\n\t\t\t\t\t\t<a class=\\\"active\\\" href=\\\"%CONTENT_DIR%\/news\/\\\">News<\/a>\r\n\t\t\t\t\t\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo \"\r\n\t\t\t\t\t\t<a href=\\\"%CONTENT_DIR%\/news\/\\\">News<\/a>\r\n\t\t\t\t\t\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t?>\r\n\t<\/li>\r\n <div class=\"dropdown\">\r\n\t\t<button class=\"dropbtn\">Boards<\/button>\r\n\t\t<div class=\"dropdown-content\">\r\n\t\t\t<a href=\"%CONTENT_DIR%\/boards\/\">Board 1<\/a>\r\n\t\t\t<a href=\"#\">Board 2<\/a>\r\n\t\t\t<a href=\"#\">Board 3<\/a>\r\n\t\t<\/div>\r\n\t<\/div>\r\n <li>\r\n\t\t<?php \r\n\t\t\tif ($navbar == \"about\"){\r\n\t\t\t\t\techo \"\r\n\t\t\t\t\t\t<a class=\\\"active\\\" href=\\\"%CONTENT_DIR%\/about\/\\\">About<\/a>\r\n\t\t\t\t\t\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo \"\r\n\t\t\t\t\t\t<a href=\\\"%CONTENT_DIR%\/about\/\\\">About<\/a>\r\n\t\t\t\t\t\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t?>\r\n\t<\/li>\r\n\t<li class=\"right\">\r\n\t\t<?php \r\n\t\t\tif ($login) { \r\n\t\t\t\tif ($navbar == \"profile\") {\r\n\t\t\t\t\techo \"\r\n\t\t\t\t\t\t<a class=\\\"active\\\" href=\\\"%CONTENT_DIR%\/profile\/\\\">Profile<\/a>\r\n\t\t\t\t\t\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo \"\r\n\t\t\t\t\t\t<a href=\\\"%CONTENT_DIR%\/profile\/\\\">Profile<\/a>\r\n\t\t\t\t\t\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t?>\r\n\t<\/li>\r\n\t<li class=\"right\">\r\n\t\t<?php \r\n\t\t\tif ($login) { \r\n\t\t\t\techo \"\r\n\t\t\t\t\t<a href=\\\"%CONTENT_DIR%\/logout\/\\\">Log out<\/a>\r\n\t\t\t\t\";\r\n\t\t\t} else { \r\n\t\t\t\tif ($navbar == \"login\") {\r\n\t\t\t\t\techo \"\r\n\t\t\t\t\t\t<a class=\\\"active\\\" href=\\\"%CONTENT_DIR%\/login\/\\\">Log in<\/a>\r\n\t\t\t\t\t\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo \"\r\n\t\t\t\t\t\t<a href=\\\"%CONTENT_DIR%\/login\/\\\">Log in<\/a>\r\n\t\t\t\t\t\";\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t?>\r\n\t<\/li>\r\n<\/ul>\r\n<br \/>\r\n\r\n"
} }