diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index 8b8eded8e..70a7825bd 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -34,7 +34,7 @@ class CommentController extends Controller $reply = new Status(); $reply->profile_id = $profile->id; - $reply->caption = e(strip_tags($comment)); + $reply->caption = e($comment); $reply->rendered = $comment; $reply->in_reply_to_id = $status->id; $reply->in_reply_to_profile_id = $status->profile_id; @@ -44,7 +44,7 @@ class CommentController extends Controller CommentPipeline::dispatch($status, $reply); if($request->ajax()) { - $response = ['code' => 200, 'msg' => 'Comment saved', 'username' => $profile->username, 'url' => $reply->url(), 'profile' => $profile->url()]; + $response = ['code' => 200, 'msg' => 'Comment saved', 'username' => $profile->username, 'url' => $reply->url(), 'profile' => $profile->url(), 'comment' => $reply->caption]; } else { $response = redirect($status->url()); } diff --git a/public/js/app.js b/public/js/app.js index e1e65874d..1d03a7288 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1 +1 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=0)}({"/7en":function(t,e,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},r=n[t]=n[t]||[];return-1==r.indexOf(e)&&r.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var r=n.indexOf(e);return-1!=r&&n.splice(r,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var r=this._onceEvents&&this._onceEvents[t],i=0;i=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n("mypn"),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,n("DuR2"))},"21It":function(t,e,n){"use strict";var r=n("FtD3");t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},"3H+/":function(t,e,n){var r,i;!function(o,s){r=[n("/7en"),n("h803")],void 0===(i=function(t,e){return s(o,t,e)}.apply(e,r))||(t.exports=i)}(window,function(t,e,n){var r=t.jQuery,i={};function o(t,e){var s=n.getQueryElement(t);if(s){if((t=s).infiniteScrollGUID){var a=i[t.infiniteScrollGUID];return a.option(e),a}this.element=t,this.options=n.extend({},o.defaults),this.option(e),r&&(this.$element=r(this.element)),this.create()}else console.error("Bad element for InfiniteScroll: "+(s||t))}o.defaults={},o.create={},o.destroy={};var s=o.prototype;n.extend(s,e.prototype);var a=0;s.create=function(){var t=this.guid=++a;if(this.element.infiniteScrollGUID=t,i[t]=this,this.pageIndex=1,this.loadCount=0,this.updateGetPath(),this.getPath&&this.getPath())for(var e in this.updateGetAbsolutePath(),this.log("initialized",[this.element.className]),this.callOnInit(),o.create)o.create[e].call(this);else console.error("Disabling InfiniteScroll")},s.option=function(t){n.extend(this.options,t)},s.callOnInit=function(){var t=this.options.onInit;t&&t.call(this,this)},s.dispatchEvent=function(t,e,n){this.log(t,n);var i=e?[e].concat(n):n;if(this.emitEvent(t,i),r&&this.$element){var o=t+=".infiniteScroll";if(e){var s=r.Event(e);s.type=t,o=s}this.$element.trigger(o,n)}};var u={initialized:function(t){return"on "+t},request:function(t){return"URL: "+t},load:function(t,e){return(t.title||"")+". URL: "+e},error:function(t,e){return t+". URL: "+e},append:function(t,e,n){return n.length+" items. URL: "+e},last:function(t,e){return"URL: "+e},history:function(t,e){return"URL: "+e},pageIndex:function(t,e){return"current page determined to be: "+t+" from "+e}};s.log=function(t,e){if(this.options.debug){var n="[InfiniteScroll] "+t,r=u[t];r&&(n+=". "+r.apply(this,e)),console.log(n)}},s.updateMeasurements=function(){this.windowHeight=t.innerHeight;var e=this.element.getBoundingClientRect();this.top=e.top+t.pageYOffset},s.updateScroller=function(){var e=this.options.elementScroll;if(e){if(this.scroller=!0===e?this.element:n.getQueryElement(e),!this.scroller)throw"Unable to find elementScroll: "+e}else this.scroller=t},s.updateGetPath=function(){var t=this.options.path;if(t){var e=typeof t;if("function"!=e)"string"==e&&t.match("{{#}}")?this.updateGetPathTemplate(t):this.updateGetPathSelector(t);else this.getPath=t}else console.error("InfiniteScroll path option required. Set as: "+t)},s.updateGetPathTemplate=function(t){this.getPath=function(){var e=this.pageIndex+1;return t.replace("{{#}}",e)}.bind(this);var e=t.replace("{{#}}","(\\d\\d?\\d?)"),n=new RegExp(e),r=location.href.match(n);r&&(this.pageIndex=parseInt(r[1],10),this.log("pageIndex",[this.pageIndex,"template string"]))};var l=[/^(.*?\/?page\/?)(\d\d?\d?)(.*?$)/,/^(.*?\/?\?page=)(\d\d?\d?)(.*?$)/,/(.*?)(\d\d?\d?)(?!.*\d)(.*?$)/];return s.updateGetPathSelector=function(t){var e=document.querySelector(t);if(e){for(var n,r,i=e.getAttribute("href"),o=0;i&&o',menu:'
'}),selectors:function(t){var n={};return e.each(t,function(t,e){n[e]="."+t}),n}(i)}).css,html:r.html,classes:r.classes,selectors:r.selectors,mixin:function(t){e.mixin(t,r)}};var o;var s}}(),i=function(){"use strict";var n;function r(e){e&&e.el||t.error("EventBus initialized without el"),this.$el=t(e.el)}return"typeahead:",n={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},e.mixin(r.prototype,{_trigger:function(e,n){var r;return r=t.Event("typeahead:"+e),(n=n||[]).unshift(r),this.$el.trigger.apply(this.$el,n),r},before:function(t){var e;return e=[].slice.call(arguments,1),this._trigger("before"+t,e).isDefaultPrevented()},trigger:function(t){var e;this._trigger(t,[].slice.call(arguments,1)),(e=n[t])&&this._trigger(e,[].slice.call(arguments,1))}}),r}(),o=function(){"use strict";var t=/\s+/,e=function(){var t;t=window.setImmediate?function(t){r(function(){t()})}:function(t){setTimeout(function(){t()},0)};return t}();return{onSync:function(t,e,r){return n.call(this,"sync",t,e,r)},onAsync:function(t,e,r){return n.call(this,"async",t,e,r)},off:function(e){var n;if(!this._callbacks)return this;e=e.split(t);for(;n=e.shift();)delete this._callbacks[n];return this},trigger:function(n){var r,o,s,a,u;if(!this._callbacks)return this;n=n.split(t),s=[].slice.call(arguments,1);for(;(r=n.shift())&&(o=this._callbacks[r]);)a=i(o.sync,this,[r].concat(s)),u=i(o.async,this,[r].concat(s)),a()&&e(u);return this}};function n(e,n,r,i){var o;if(!r)return this;for(n=n.split(t),r=i?function(t,e){return t.bind?t.bind(e):function(){t.apply(e,[].slice.call(arguments,0))}}(r,i):r,this._callbacks=this._callbacks||{};o=n.shift();)this._callbacks[o]=this._callbacks[o]||{sync:[],async:[]},this._callbacks[o][e].push(r);return this}function i(t,e,n){return function(){for(var r,i=0,o=t.length;!r&&i