From b4fb8b6f6fc7077bd2ccc9a4a10aacdf6fe4d6a5 Mon Sep 17 00:00:00 2001 From: kteraguchi Date: Tue, 25 Apr 2017 18:04:04 +0900 Subject: [PATCH 1/2] Fix script tag escape --- html/webapp/components/escape/Text.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/html/webapp/components/escape/Text.class.php b/html/webapp/components/escape/Text.class.php index c3e1ae6..7572899 100644 --- a/html/webapp/components/escape/Text.class.php +++ b/html/webapp/components/escape/Text.class.php @@ -445,6 +445,11 @@ function _escapeWysiwygAllowHtmltag($string) { $script_flag = false; foreach ($parts as $part) { // script-/scriptまではそのまま連結 + if(preg_match("/<\/script>$/u", $part)) { + $script_flag = false; + $string .= $part; + continue; + } if(preg_match("/^/u", $part) || $script_flag == true) { $script_flag = true; if (preg_match("/<\!\-\-comment\-\->/u", $part)) { @@ -453,10 +458,6 @@ function _escapeWysiwygAllowHtmltag($string) { } $string .= $part; continue; - } else if(preg_match("/<\/script>$/u", $part)) { - $script_flag = false; - $string .= $part; - continue; } if (preg_match("/<\!\-\-comment\-\->/u", $part)) { From c06abd188c5e04d4f52ae58b587d9915f23341bf Mon Sep 17 00:00:00 2001 From: Ryuji Masukawa Date: Wed, 17 Jan 2018 18:52:29 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A5=E4=B8=8B=E3=81=AE=E4=B8=8D?= =?UTF-8?q?=E5=85=B7=E5=90=88=E3=82=92=E4=BF=AE=E6=AD=A3=20=E2=91=A0?= =?UTF-8?q?=E6=96=B0=E8=A6=8F=E3=81=A7ToDo=E3=82=92=E4=BD=9C=E6=88=90=20?= =?UTF-8?q?=E2=91=A1ToDo=E3=82=92=E8=BF=BD=E5=8A=A0=EF=BC=88=E3=82=AB?= =?UTF-8?q?=E3=83=AC=E3=83=B3=E3=83=80=E3=83=BC=E3=81=AB=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=95=E3=81=9B=E3=82=8B=EF=BC=89=20=E2=91=A2=E3=82=BB?= =?UTF-8?q?=E3=83=83=E3=83=86=E3=82=A3=E3=83=B3=E3=82=B0=E3=83=A2=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=81=A7ToDo=E3=83=AA=E3=82=B9=E3=83=88=E4=B8=80?= =?UTF-8?q?=E8=A6=A7=E8=A1=A8=E7=A4=BA=E3=81=AE=E7=8A=B6=E6=85=8B=E3=81=A7?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E9=81=B8=E6=8A=9E=E3=80=81=E3=80=8C?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=80=8D=E3=83=9C=E3=82=BF=E3=83=B3=E6=8A=BC?= =?UTF-8?q?=E4=B8=8B=20=E2=91=A3=E3=82=AB=E3=83=AC=E3=83=B3=E3=83=80?= =?UTF-8?q?=E3=83=BC=E3=81=AE=E4=BA=88=E5=AE=9A=E3=81=8C=E5=89=8A=E9=99=A4?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=9A=E6=AE=8B=E3=81=A3=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=82=8B=E7=8A=B6=E6=85=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/todo/action/dicon.ini | 3 ++- .../todo/action/edit/delete/Delete.class.php | 14 ++++++++++++++ .../modules/todo/action/edit/delete/maple.ini | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/html/webapp/modules/todo/action/dicon.ini b/html/webapp/modules/todo/action/dicon.ini index a22cc43..d94360c 100644 --- a/html/webapp/modules/todo/action/dicon.ini +++ b/html/webapp/modules/todo/action/dicon.ini @@ -1,3 +1,4 @@ [DIContainer] todoAction = "modules://todo.components.action" -todoView = "modules://todo.components.view" \ No newline at end of file +todoView = "modules://todo.components.view" +calendarPlanAction = "calendar.action" diff --git a/html/webapp/modules/todo/action/edit/delete/Delete.class.php b/html/webapp/modules/todo/action/edit/delete/Delete.class.php index bf49ca8..d2d0144 100644 --- a/html/webapp/modules/todo/action/edit/delete/Delete.class.php +++ b/html/webapp/modules/todo/action/edit/delete/Delete.class.php @@ -19,6 +19,7 @@ class Todo_Action_Edit_Delete extends Action // 使用コンポーネントを受け取るため var $todoAction = null; var $db = null; + var $calendarPlanAction = null; /** * Todo削除アクション @@ -27,6 +28,19 @@ class Todo_Action_Edit_Delete extends Action */ function execute() { + $whereParams = array( + "todo_id" => $this->todo_id, + "calendar_id!=0" => null + ); + $tasks = $this->db->selectExecute('todo_task', $whereParams); + if(!empty($tasks)) { + foreach($tasks as $task) { + if (!$this->calendarPlanAction->deletePlan($task["calendar_id"], CALENDAR_PLAN_EDIT_THIS)) { + return false; + } + } + } + $whereParams = array( "todo_id" => $this->todo_id ); diff --git a/html/webapp/modules/todo/action/edit/delete/maple.ini b/html/webapp/modules/todo/action/edit/delete/maple.ini index ba8de50..6bf5c35 100644 --- a/html/webapp/modules/todo/action/edit/delete/maple.ini +++ b/html/webapp/modules/todo/action/edit/delete/maple.ini @@ -6,6 +6,7 @@ key:room_id,block_id,todo_id.todo.todoExists = "1:lang._invalid_input" [Action] db = "ref:DbObject" +calendarPlanAction = "ref:calendarPlanAction" [View] success = "action:todo_view_edit_list" \ No newline at end of file