1(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof module==="object"&&module.exports){module.exports=factory(require("jquery"))}else{factory(window.jQuery)}})(function($){const SPECIAL_CHARS={NON_BREAKING_SPACE:/\u00A0/g,NEWLINE:/\n/g};function getSanitizeStringURI(){if(typeof route!=="undefined"){return Ziggy.namedRoutes["api.suggest.sanitize_string"].uri}else{return"/api/v1/suggest/sanitize-string"}}$.extend($.summernote.options,{striptags:{api:{method:"POST",url:getSanitizeStringURI(),dataKey:"string",resultKey:"string"}}});$.extend($.summernote.plugins,{striptags:function(context){const $editorInstance=context.layoutInfo.note;const options=$.extend(true,{},$.summernote.options.striptags,context.options.striptags);function sanitizeText(text,convertNewlinesToBreaks){if(!text)return"";let sanitized=text;sanitized=sanitized.replace(SPECIAL_CHARS.NEWLINE,convertNewlinesToBreaks?"<br>":" ");sanitized=sanitized.replace(SPECIAL_CHARS.NON_BREAKING_SPACE," ");return sanitized.trim()}function insertNode(text,convertNewlinesToBreaks){const sanitizedText=sanitizeText(text,convertNewlinesToBreaks);if(!sanitizedText)return;const $html=$("<span/>").html(sanitizedText);$editorInstance.summernote("insertNode",$html[0]);context.triggerEvent("insertNode")}function getRequestBody(htmlContent){const apiConfig=options.api;const body=new FormData;const headers=new Headers({"X-CSRF-TOKEN":$("meta[name=csrf-token]").attr("content"),Accept:"application/json"});body.append(apiConfig.dataKey,htmlContent);if(apiConfig.data){Object.entries(apiConfig.data).forEach(([key,value])=>{body.append(key,value)})}return{method:apiConfig.method,headers:headers,body:body}}function isInternetExplorer(){const userAgent=window.navigator.userAgent;const isMSIE=userAgent.indexOf("MSIE ")>0;const isTrident=!!navigator.userAgent.match(/Trident.*rv\:11\./);return isMSIE||isTrident}function getClipboardData(event){if(window.clipboardData&&window.clipboardData.getData){return window.clipboardData}return event.originalEvent.clipboardData}function getHTMLFromClipboard(clipboard){if(!clipboard)return null;if(isInternetExplorer()){return window.clipboardData.getData("Text")}return clipboard.getData("text/html")}async function sanitizeViaAPI(html){try{const response=await fetch(options.api.url,getRequestBody(html));if(!response.ok){console.log("HTTP request failed:",response.status);return}const sanitizedValue=await response.json();insertNode(sanitizedValue,false)}catch(error){console.log("Sanitize error:",error.message)}}function handlePaste(summernoteEvent,event){event.preventDefault();event.stopImmediatePropagation();const clipboard=getClipboardData(event);if(!clipboard)return;const html=getHTMLFromClipboard(clipboard);if(!html){const plainText=clipboard.getData("Text");if(/<[^>]+>/.test(plainText)){sanitizeViaAPI(plainText)}else{insertNode(plainText,true)}return}sanitizeViaAPI(html)}$editorInstance.on("summernote.paste",handlePaste)}})});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.