Commit bbf8871f by Bagus Pambudi

page button dan small

parent 33ea096a
......@@ -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','small','button']);
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button']);
$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']));
$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']));
$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']));
$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']));
$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']));
$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']));
$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']));
$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']));
$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']);
$request['content_en'] = strip_tags($request->content_en, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section']);
$request['content_de'] = strip_tags($request->content_de, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section']);
$request['content_sa'] = strip_tags($request->content_sa, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section']);
$request['content_zh'] = strip_tags($request->content_zh, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section']);
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button']);
$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']);
$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']);
$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']);
$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']);
$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']);
$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']);
}
else{
if ($data['content'] == null) {
......@@ -303,7 +303,7 @@ class PageController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['title']));
$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']));
$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']));
$dataEn['title'] = $title;
$dataEn['content'] = $content;
......@@ -316,7 +316,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']);
$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']);
}
else{
if($data['content']==null){
......@@ -324,7 +324,7 @@ class PageController extends Controller
}
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['title']));
$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']));
$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']));
$dataDe['title'] = $title;
$dataDe['content'] = $content;
......@@ -337,7 +337,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']);
$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']);
}
else{
if($data['content']==null){
......@@ -346,7 +346,7 @@ class PageController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['title']));
$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']));
$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']));
$dataSa['title'] = $title;
$dataSa['content'] = $content;
......@@ -359,7 +359,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']);
$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']);
}
else{
if($data['content']==null){
......@@ -368,7 +368,7 @@ class PageController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['title']));
$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']));
$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']));
$dataZh['title'] = $title;
$dataZh['content'] = $content;
......
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