Commit 072971a9 by Bagus Pambudi

page allow thead tbody

parent 141e008d
......@@ -79,7 +79,7 @@ class PageController extends Controller
*/
public function store(Request $request)
{
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']);
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']);
$request['title'] = strip_tags($request->title);
$request->validate([
'title' => 'required',
......@@ -121,7 +121,7 @@ class PageController extends Controller
$data['content'] = 'kosong';
}
$content = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']));
$content = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']));
$dataEn['page_id'] = $page->id;
$dataEn['title'] = $title;
......@@ -139,7 +139,7 @@ class PageController extends Controller
$data['content'] = 'kosong';
}
$content = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']));
$content = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']));
$dataDe['page_id'] = $page->id;
$dataDe['title'] = $title;
......@@ -157,7 +157,7 @@ class PageController extends Controller
$data['content'] = 'kosong';
}
$content = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']));
$content = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']));
$dataSa['page_id'] = $page->id;
$dataSa['title'] = $title;
......@@ -175,7 +175,7 @@ class PageController extends Controller
$data['content'] = 'kosong';
}
$content = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']));
$content = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']));
$dataZh['page_id'] = $page->id;
$dataZh['title'] = $title;
......@@ -241,11 +241,11 @@ class PageController extends Controller
*/
public function update(Request $request, $id)
{
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']);
$request['content_en'] = strip_tags($request->content_en, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']);
$request['content_de'] = strip_tags($request->content_de, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']);
$request['content_sa'] = strip_tags($request->content_sa, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']);
$request['content_zh'] = strip_tags($request->content_zh, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button','span','style','h1','h2','h3','h4','h5','h6']);
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']);
$request['content_en'] = strip_tags($request->content_en, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']);
$request['content_de'] = strip_tags($request->content_de, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']);
$request['content_sa'] = strip_tags($request->content_sa, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']);
$request['content_zh'] = strip_tags($request->content_zh, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button','span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']);
$request['title'] = strip_tags($request->title);
$request['title_en'] = strip_tags($request->title_en);
$request['title_de'] = strip_tags($request->title_de);
......@@ -294,7 +294,7 @@ class PageController extends Controller
{
if ($manual==1){
$dataEn['title'] = strip_tags($data['title_en']);
$dataEn['content'] = strip_tags($data['content_en'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']);
$dataEn['content'] = strip_tags($data['content_en'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']);
}
else{
if ($data['content'] == null) {
......@@ -304,7 +304,7 @@ class PageController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['title']));
if (strlen($data['content']) < 5000) {
$content = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']));
$content = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']));
$dataEn['content'] = $content;
}
$dataEn['title'] = $title;
......@@ -317,7 +317,7 @@ class PageController extends Controller
{
if($manual==1){
$dataDe['title'] = strip_tags($data['title_de']);
$dataDe['content'] = strip_tags($data['content_de'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']);
$dataDe['content'] = strip_tags($data['content_de'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']);
}
else{
if($data['content']==null){
......@@ -326,7 +326,7 @@ class PageController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['title']));
if (strlen($data['content']) < 5000) {
$content = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']));
$content = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']));
$dataDe['content'] = $content;
}
$dataDe['title'] = $title;
......@@ -339,7 +339,7 @@ class PageController extends Controller
{
if($manual==1){
$dataSa['title'] = strip_tags($data['title_sa']);
$dataSa['content'] = strip_tags($data['content_sa'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']);
$dataSa['content'] = strip_tags($data['content_sa'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']);
}
else{
if($data['content']==null){
......@@ -349,7 +349,7 @@ class PageController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['title']));
if (strlen($data['content']) < 5000) {
$content = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']));
$content = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']));
$dataSa['content'] = $content;
}
$dataSa['title'] = $title;
......@@ -362,7 +362,7 @@ class PageController extends Controller
{
if($manual==1){
$dataZh['title'] = strip_tags($data['title_zh']);
$dataZh['content'] = strip_tags($data['content_zh'],['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']);
$dataZh['content'] = strip_tags($data['content_zh'],['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']);
}
else{
if($data['content']==null){
......@@ -372,7 +372,7 @@ class PageController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['title']));
if (strlen($data['content']) < 5000) {
$content = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6']));
$content = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']));
$dataZh['content'] = $content;
}
$dataZh['title'] = $title;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment