Lines Matching +full:style +full:. +full:local +full:. +full:ini

4         dom.click();
13 results = results.replace(regex, function(m) {
14 m = m.replace(/\s+/g, "");
18 regex = new RegExp("\\>(.*?)(\\]\\]\\<\\/font\\>)|(\\<\\/font\\>\\]\\])", "gm");
19 if (results.match(regex)) return true;
21 regex = new RegExp("(\\{\\{(.*?)\\.\\w{2,4})\\|\\<font");
22 if (results.match(regex)) return true;
24 regex = new RegExp("\\{\\{(.*?)\\.\\w{2,4}\\|[:\\w\\-\\.\\s]+\\<\\/font");
25 if (results.match(regex)) return true;
27 regex = new RegExp('\\>\\{\\{(.*?)\\.\\w+\\<\\/font\\>\\b', 'gm');
28 if (results.match(regex)) return true;
36 function check_rowspans(rows, start_row, ini) {
38 for (var i = start_row; i < rows.length; i++) {
39 for (var col = 0; col < rows[i].length; col++) {
40 if (rows[i][col].rowspan > 0) {
41 var _text = rows[i][col].text;
42 tmp.push({
45 spans: rows[i][col].rowspan,
48 if (!ini) break;
57 var prev_colspans = rows[row][col].colspan ? rows[row][col].colspan : 0;
58 rows[row][col].rowspan = 0;
61 rows[++row].splice(col, 0, {
76 var num_spans = tmp_start.length;
80 var row = tmp_start[0].row;
81 var col = tmp_start[0].column;
82 insert_rowspan(row, col, tmp_start[0].spans, rows);
88 if (tmp.length) {
89 insert_rowspan(tmp[0].row, tmp[0].column, tmp[0].spans, rows);
98 for (var i = 0; i < rows.length; i++) {
103 for (var i = 0; i < rows.length; i++) {
105 for (var col = 0; col < rows[i].length; col++) {
106 var type = rows[i][col].type == 'td' ? '|' : '^';
108 var align = rows[i][col].align ? rows[i][col].align : false;
113 results += rows[i][col].text;
118 if (rows[i][col].colspan) {
119 for (var n = 0; n < rows[i][col].colspan - 1; n++) {
131 window.dwfckTextChanged = false;
279 String.prototype.splice = function(idx, rem, s) {
280 return (this.slice(0, idx) + s + this.slice(idx + Math.abs(rem)));
282 String.frasl = new RegExp("⁄\|&frasl;\|&#8260;\|&#x2044;", 'g');
284 HTMLParser(CKEDITOR.instances.wiki__text.getData(), {
339 var c1_inx = results.lastIndexOf(c1); // start position of chars to delete
340 var c2_inx = results.indexOf(c2, c1_inx); // position of expected next character
342 if (c1.length + c2_inx == c2_inx) {
343 var left_side = results.substring(0, c1_inx); //from 0 up to but not including c1
344 var right_side = results.substring(c2_inx); //from c2 to end of string
351 var iw_type = class_name.match(/iw_(\w+\.?\w{0,12})/);
352 var iw_title = title.split(/\/\//);
353 var interwiki_label = iw_title[iw_title.length - 1];
354 if (!interwiki_label.match(/oIWIKIo.*?cIWIKIc/)) {
357 interwiki_label = interwiki_label.replace(/^.*?oIWIKIo/, 'oIWIKIo');
358 interwiki_label = interwiki_label.replace(/cIWIKIc.*/, 'cIWIKIc');
359 iw_type[1] = iw_type[1].replace(/_(\w{2})/g, "." + "$1");
360 this.attr = iw_type[1] + '>' + decodeURIComponent(interwiki_label);
362 this.interwiki = true;
366 this_debug = this.dbg;
369 if (format_chars[tag] && this.in_link) {
370 this.link_formats.push(tag);
373 if (format_chars[tag] && (this.in_font || this.in_header)) {
382 if (format_chars[tag] && this.in_endnotes) {
386 if(this.in_table) {
388 this.list_level = 0;
389 …jQuery('#dw__editform').append('<input type="hidden" id="linkintbl" name="linkintbl" value="del" /…
392 this.prev_list_level = this.list_level;
393 this.list_level++;
394 if (this.list_level == 1) this.list_started = false;
395 if (this.list_started) this.prev_li.push(markup['li']);
399 } else if (!this.list_level) {
401 this.prev_li = new Array();
404 this.is_mediafile = false;
410 var style = false;
414 this.is_smiley = false;
415 this.in_link = false;
421 this.xcl_markup = false; // set to false in end() as well, double sure
422 this.in_link = true;
423 this.link_pos = results.length;
424 this.link_formats = new Array();
425 this.footnote = false;
427 this.id = "";
428 this.external_mime = false;
430 this.export_code = false;
431 this.code_snippet = false;
432 this.downloadable_file = "";
434 this.link_only = false;
436 this.interwiki = false;
437 this.bottom_url = false;
438 this.link_title = false;
444 this.in_link = false;
445 if (this.in_table) {
453 this.td_no = 0;
454 this.tr_no = 0;
455 this.in_table = true;
456 this.is_rowspan = false;
457 this.row = -1;
458 this.rows = new Array();
459 CurrentTable = this.rows;
460 this.table_start = results.length;
462 this.tr_no++;
463 this.td_no = 0;
464 this.col = -1;
465 this.row++;
466 this.rows[this.row] = new Array();
467 this.current_row = this.rows[this.row];
469 this.td_no++;
470 this.col++;
471 this.current_row[this.col] = {
477 this.cell_start = results.length;
478 this.current_cell = this.current_row[this.col];
479 … if (this.td_rowspan && this.rowspan_col == this.td_no && this.td_no != this.last_column) {
480 this.is_rowspan = true;
481 this.td_rowspan--;
483 this.is_rowspan = false;
491 this.attr = false;
492 this.format_tag = false;
494 if (format_chars[tag]) this.format_tag = true;
497 for (var i = 0; i < attrs.length; i++) {
499 // if(!confirm(tag + ' ' + attrs[i].name + '="' + attrs[i].escaped + '"')) exit;
501 if (attrs[i].name == 'colspan') {
502 this.current_row[this.col].colspan = attrs[i].value;
504 if (attrs[i].name == 'class') {
505 if ((matches = attrs[i].value.match(/(left|center|right)/))) {
506 this.current_row[this.col].align = matches[1];
509 if (attrs[i].name == 'rowspan') {
510 this.current_row[this.col].rowspan = attrs[i].value
513 if (attrs[i].escaped == 'u' && tag == 'em') {
515 this.attr = 'u'
520 if (attrs[i].name == 'class' && attrs[i].value == 'footnotes') {
522 this.in_endnotes = true;
526 if (tag == 'dl' && attrs[i].name == 'class' && attrs[i].value == 'file') {
527 this.downloadable_code = true;
531 if (tag == 'span' && attrs[i].name == 'class') {
532 if (attrs[i].value == 'np_break') return;
535 if (tag == 'span' && attrs[i].name == 'class') {
536 if (attrs[i].value == 'curid') {
537 this.curid = true;
540 if (attrs[i].value == 'multi_p_open') {
541 this.in_multi_plugin = true;
545 if (attrs[i].value == 'multi_p_close') {
546 this.in_multi_plugin = false;
549 if (attrs[i].value.match(geshi_classes)) {
551 this.geshi = true;
558 if (attrs[i].name == 'style') {
559 if (!this.in_font) results += "__STYLE__";
560 this.in_font = true;
561 this.using_fonts = true;
562 matches = attrs[i].value.match(/font-family:\s*([\w\-\s,]+);?/);
564 this.font_family = matches[1];
567 //matches = attrs[i].value.match(/font-size:\s*(\d+(\w+|%));?/);
568 matches = attrs[i].value.match(/font-size:\s*(.*)/);
570 matches[1] = matches[1].replace(/;/, "");
571 this.font_size = matches[1];
573 matches = attrs[i].value.match(/font-weight:\s*(\w+);?/);
575 this.font_weight = matches[1];
577 matches = attrs[i].value.match(/.*?color:\s*(.*)/);
580 matches[1] = matches[1].replace(/;/, "");
581 if (matches[0].match(/background/)) {
582 this.font_bgcolor = matches[1];
584 this.font_color = matches[1];
588 matches = attrs[i].value.match(/background:\s*(\w+)/);
589 if (matches && matches[0].match(/background/)) {
590 this.font_bgcolor = matches[1];
599 results = results.replace(/\^$/, '|');
601 this.in_td = true;
602 if (attrs[i].name == 'align') {
603 this.td_align = attrs[i].escaped;
605 } else if (attrs[i].name == 'class') {
606 matches = attrs[i].value.match(/\s*(\w+)align/);
608 this.td_align = matches[1];
610 } else if (attrs[i].name == 'colspan') {
612 this.td_colspan = attrs[i].escaped;
613 } else if (attrs[i].name == 'rowspan') {
614 this.td_rowspan = attrs[i].escaped - 1;
615 this.rowspan_col = this.td_no;
623 … // if(!confirm(attrs[i].name + '="' + attrs[i].escaped + '"')) exit;
624 if (attrs[i].name == 'title') {
625 this.link_title = attrs[i].escaped;
627 interwiki_title = attrs[i].escaped;
628 } else this.link_title = this.link_title.replace(/\s+.*$/, "");
629 } else if (attrs[i].name == 'class') {
630 if (attrs[i].value.match(/fn_top/)) {
631 this.footnote = true;
632 } else if (attrs[i].value.match(/fn_bot/)) {
634 } else if (attrs[i].value.match(/mf_(png|gif|jpg|jpeg)/i)) {
635 this.link_only = true;
636 } else if (attrs[i].value.match(/interwiki/)) {
637 attrs[i].value = attrs[i].value.replace(/\./g, '_');
638 this.link_class = attrs[i].value;
642 this.link_class = attrs[i].escaped;
643 media_class = this.link_class.match(/mediafile/);
644 } else if (attrs[i].name == 'id') {
645 this.id = attrs[i].value;
646 } else if (attrs[i].name == 'type') {
647 type = attrs[i].value;
648 } else if (attrs[i].name == 'href' && !this.code_type) {
649 var http = attrs[i].escaped.match(/https*:\/\//) ? true : false;
650 if (http) save_url = attrs[i].escaped;
651 if (attrs[i].escaped.match(/\/lib\/exe\/detail.php/)) {
652 this.image_link_type = 'detail';
653 } else if (attrs[i].escaped.match(/exe\/fetch.php/)) {
654 this.image_link_type = 'direct';
657 … if (this.link_class && this.link_class.match(/media/) && !this.link_title) {
658 var link_find = attrs[i].escaped.match(/media=(.*)/);
659 if (link_find) this.link_title = link_find[1];
663 … var media_type = attrs[i].escaped.match(/fetch\.php.*?media=.*?\.(png|gif|jpg|jpeg)$/i);
666 if (attrs[i].escaped.match(/^https*:/)) {
667 this.attr = attrs[i].escaped;
670 if (attrs[i].escaped.match(/^ftp:/)) {
671 this.attr = attrs[i].escaped;
673 } else if (attrs[i].escaped.match(/do=export_code/)) {
674 this.export_code = true;
675 } else if (attrs[i].escaped.match(/^nntp:/)) {
676 this.attr = attrs[i].escaped;
678 } else if (attrs[i].escaped.match(/^mailto:/)) {
679 this.attr = attrs[i].escaped.replace(/mailto:/, "");
681 } else if (attrs[i].escaped.match(/m-files/)) {
682 this.attr = attrs[i].escaped;
683 this.mfile = attrs[i].escaped;
685 } else if (attrs[i].escaped.match(/^file:/)) { //samba share
686 var url = attrs[i].value.replace(/file:[\/]+/, "");
687 url = url.replace(/[\/]/g, '\\');
689 this.attr = url;
693 … else if (http && !media_type && (matches = attrs[i].escaped.match(/fetch\.php(.*)/))) {
694 if (matches[1].match(/media=/)) {
695 elems = matches[1].split(/=/);
696 this.attr = elems[1];
698 matches[1] = matches[1].replace(/^\//, "");
699 this.attr = matches[1];
703 var regex = new RegExp(config_animal + '\/file\/(.*)');
704 matches = attrs[i].escaped.match(regex);
705 if (matches && matches[1]) this.attr = matches[1];
706 if (this.attr) this.attr = this.attr.replace(/\//g, ':');
710 … this.attr = decodeURIComponent ? decodeURIComponent(this.attr) : unescape(this.attr);
711 if (!this.attr.match(/^:/)) {
712 this.attr = ':' + this.attr;
714 this.external_mime = true;
718 matches = attrs[i].escaped.match(/doku.php\?id=(.*)/);
720 var rx = DOKU_BASE + 'doku.php';
721 if (!attrs[i].escaped.match(rx)) {
722 this.link_class == 'urlextern';
723 this.attr = save_url;
728 matches = attrs[i].escaped.match(/doku.php\/(.*)/);
731 … requires initial ? to be recognized by DW. In Anteater and later */
733 if (!matches[1].match(/\?/) && matches[1].match(/&amp;/)) {
735 matches[1] = matches[1].replace(/&amp;/, '?')
739 if (!matches[1].match(/^:/)) {
740 this.attr = ':' + matches[1];
742 this.attr = matches[1];
745 … if (this.attr.match(/\.\w+$/)) { // external mime's first access
747 this.external_mime = true;
749 for (var n = i + 1; n < attrs.length; n++) {
750 if (attrs[n].value.match(/other_mime/))
751 this.external_mime = true;
759 matches = attrs[i].value.match(/\\\\/); // Windows share
761 this.attr = attrs[i].escaped;
767 if (this.link_class == 'media') {
768 if (attrs[i].value.match(/http:/)) {
773 if (!this.attr && this.link_title) {
775 if (matches = this.link_class.match(/media(.*)/)) {
776 … this.link_title = decodeURIComponent(safe_convert(this.link_title));
777 this.attr = this.link_title;
778 var m = matches[1].split(/_/);
784 if (!this.attr.match(/^:/) && !this.attr.match(/^https?\:/)) {
785 this.attr = ':' + this.attr.replace(/^\s+/, "");
787 this.external_mime = true;
792 …if (this.attr.match && this.attr.match(/%[a-fA-F0-9]{2}/) && (matches = this.attr.match(/userfiles…
793 matches[1] = matches[1].replace(/\//g, ':');
794 if (!matches[1].match(/^:/)) {
797 … this.attr = decodeURIComponent ? decodeURIComponent(matches[1]) : unescape(matches[1]);
798 … this.attr = decodeURIComponent ? decodeURIComponent(this.attr) : unescape(this.attr);
799 this.external_mime = true;
801 } else if (this.attr && this.attr.match(/%[a-fA-F0-9]{2}/)) {
802 this.attr = decodeURIComponent(this.attr);
803 this.attr = decodeURIComponent(this.attr);
806 …// alert('title: ' + this.link_title + ' class: ' + this.link_class + ' export: ' +this.export_co…
807 … if (this.link_title && this.link_title.match(/Snippet/)) this.code_snippet = true;
810 if (attrs[i].value.match(/^#/) && this.link_class.match(/wikilink/)) {
811 this.attr = attrs[i].value;
812 this.link_title = false;
816 if (this.link_class.match(/wikilink/) && this.link_title) {
817 this.external_mime = false;
818 if (!this.attr) {
819 this.attr = this.link_title;
821 if (!this.attr.match(/^:/)) {
822 this.attr = ':' + this.attr;
824 if (this.attr.match(/\?.*?=/)) {
825 var elems = this.attr.split(/\?/);
826 elems[0] = elems[0].replace(/\//g, ':');
827 this.attr = elems[0] + '?' + elems[1];
829 this.attr = this.attr.replace(/\//g, ':');
832 … /* catch query strings attached to internal links for .htacess nice urls */
833 if (!qs_set && attrs[i].name == 'href') {
834 … if (!this.attr.match(/\?.*?=/) && !attrs[i].value.match(/doku.php/)) {
835 var qs = attrs[i].value.match(/(\?.*)$/);
836 if (qs && qs[1]) this.attr += qs[1];
840 … } else if (this.link_class.match(/mediafile/) && this.link_title && !this.attr) {
841 this.attr = this.link_title;
842 this.external_mime = true;
844 if (!this.attr.match(/^:/)) {
845 this.attr = ':' + this.attr;
847 } else if (this.link_class.match(/interwiki/)) {
848 interwiki_class = this.link_class;
851 if (this.link_class == 'urlextern' && !this.mfile && save_url) {
852 this.attr = save_url;
853 …this.external_mime = false; // prevents external links to images from being converted to image lin…
855 if (this.in_endnotes) {
856 if (this.link_title) {
857 this.bottom_url = this.link_title; //save for bottom urls
858 } else if (this.attr) {
859 this.bottom_url = this.attr;
862 this.link_title = "";
863 this.link_class = "";
869 this.is_iwiki(interwiki_class, interwiki_title);
875 if (attrs[i].name == 'class') {
876 matches = attrs[i].value.split(/\s+/);
878 this.attr = matches[0];
880 … if (oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj.notes[matches[1]]) {
881 … dwfck_note = '((' + oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj.notes[matches[1]] + '))';
889 if (attrs[i].name == 'class') {
891 var elems = attrs[i].escaped.split(/\s+/);
892 if (elems.length > 1) {
893 this.attr = attrs[i].value;
894 this.code_type = elems[0];
896 this.attr = attrs[i].escaped;
897 this.code_type = this.attr;
899 if (this.downloadable_code) {
900 this.attr = this.attr.replace(/\s*code\s*/, "");
901 this.code_type = 'file';
904 if (this.in_table) tag = 'pre_td';
909 if (attrs[i].name == 'alt') {
910 alt = attrs[i].value;
912 if (attrs[i].name == 'type') {
913 this.image_link_type = attrs[i].value;
916 if (attrs[i].name == 'src') {
917 …// alert(attrs[i].name + ' = ' + attrs[i].value + ', fnencode=' + oDokuWiki_FCKEditorInstance.dw…
920 // fetched by fetch.php
921 if (matches = attrs[i].escaped.match(/fetch\.php.*?(media=.*)/)) {
922 var elems = matches[1].split('=');
924 if (matches = attrs[i].escaped.match(/(media.*)/)) {
925 var elems = matches[1].split('=');
929 if (!src.match(/https?:/) && !src.match(/^:/)) src = ':' + src;
930 } else if (attrs[i].escaped.match(/https?:\/\//)) {
931 src = attrs[i].escaped;
932 src = src.replace(/\?.*?$/, "");
935 else if (matches = attrs[i].escaped.match(/\/_media\/(.*)/)) {
936 var elems = matches[1].split(/\?/);
938 src = src.replace(/\//g, ':');
939 if (!src.match(/^:/)) src = ':' + src;
942 … else if (matches = attrs[i].escaped.match(/\/lib\/exe\/fetch.php\/(.*)/)) {
943 var elems = matches[1].split(/\?/);
945 if (!src.match(/^:/)) src = ':' + src;
948 matches = attrs[i].escaped.match(/^.*?\/userfiles\/image\/(.*)/);
950 var regex = new RegExp(config_animal + '\/image\/(.*)$');
951 matches = attrs[i].escaped.match(regex);
953 if (!matches) { // windows style
955 regex = regex.replace(/([\/\\])/g, "\\$1");
956 regex = '^.*?' + regex + '(.*)';
958 matches = attrs[i].escaped.match(regex);
961 src = matches[1].replace(/\//g, ':');
964 … src = decodeURIComponent ? decodeURIComponent(attrs[i].escaped) : unescape(attrs[i].escaped);
965 if (src.search(/data:image.*?;base64/) > -1) {
971 if (src && src.match(/lib\/images\/smileys/)) {
972 // src = 'http://' + window.location.host + src;
973 this.is_smiley = true;
975 this.attr = src;
976 … if (this.attr && this.attr.match && this.attr.match(/%[a-fA-F0-9]{2}/)) {
977 this.attr = decodeURIComponent(safe_convert(this.attr));
978 this.attr = decodeURIComponent(safe_convert(this.attr));
984 else if (attrs[i].name == 'width' && !style) {
985 width = attrs[i].value;
987 } else if (attrs[i].name == 'height' && !style) {
988 height = attrs[i].value;
989 } else if (attrs[i].name == 'style') {
990 var match = attrs[i].escaped.match(/width:\s*(\d+)/);
993 var match = attrs[i].escaped.match(/height:\s*(\d+)/);
996 } else if (attrs[i].name == 'align' || attrs[i].name == 'class') {
997 if (attrs[i].escaped.match(/(center|middle)/)) {
999 } else if (attrs[i].escaped.match(/right/)) {
1001 } else if (attrs[i].escaped.match(/left/)) {
1010 if (this.is_smiley) {
1015 this.is_smiley = false;
1018 if (this.link_only) tag = 'img';
1020 if (this.in_multi_plugin) {
1025 if (!this.code_type) {
1027 } else if (this.code_type) {
1032 if (this.in_table) {
1036 if (this.list_started) {
1042 } else if (tag.match(/^h(\d+|r)/)) {
1043 var str_len = results.length;
1044 if (tag.match(/h(\d+)/)) {
1045 this.in_header = true;
1048 if (results.charCodeAt(str_len - 1) == 32) {
1049 results = results.replace(/\x20+$/, "");
1052 } else if (this.last_col_pipes) {
1060 if (tag == 'b' || tag == 'i' && this.list_level) {
1061 if (results.match(/(\/\/|\*)(\x20)+/)) {
1062 results = results.replace(/(\/\/|\*)(\x20+)\-/, "$1\n" + "$2-");
1065 if(this.in_table && tag == 'li') {
1068 if (tag == 'li' && this.list_level) {
1069 if (this.list_level == 1 & !this.list_started) {
1071 this.list_started = true;
1073 results = results.replace(/[\x20]+$/, "");
1075 for (var s = 0; s < this.list_level; s++) {
1077 if (results.match(/_FORMAT_SPACE_\s*$/)) {
1078 results = results.replace(/_FORMAT_SPACE_\s*$/, "\n");
1080 if (this.list_level > 1) {
1085 if (this.prev_list_level > 0 && markup['li'] == markup['ol']) {
1086 this.prev_list_level = -1;
1089 if (tag == 'a' && this.list_level) {
1093 this.xcl_markup = true;
1095 } else if (tag == 'a' && (this.export_code || this.code_snippet)) {
1097 } else if (tag == 'a' && this.footnote) {
1100 HTMLParserTopNotes.push(this.id);
1101 } else if (tag == 'a' && this.external_mime) {
1102 if (this.in_endnotes) {
1103 this.link_class = 'media';
1109 results += this.attr + '|';
1110 this.is_mediafile = true;
1114 } else if (this.in_font) {
1116 results = results.replace(/__STYLE__/, '[[' + this.attr + '|');
1117 this.in_font = false;
1123 if (this.in_endnotes && tag == 'a') return;
1124 if (this.code_type && tag == 'span') tag = 'blank';
1125 if (this.mfile && !this.attr) {
1126 this.attr = this.mfile;
1130 … if (tag == 'td' || tag == 'th' || (this.last_col_pipes && this.td_align == 'center')) {
1131 if (this.is_rowspan) {
1133 this.is_rowspan = false;
1135 if (this.td_align == 'center' || this.td_align == 'right') {
1139 } else if (tag == 'a' && this.attr) {
1140 this.attr = this.attr.replace(/%7c/, '%257c');
1141 results += this.attr + '|';
1143 var link_type = this.image_link_type;
1144 this.image_link_type = "";
1145 if (this.link_only) link_type = 'link_only';
1167 this.attr += img_size;
1169 this.attr += ' ';
1172 results += this.attr + '|' + alt + '}}';
1173 } else results += this.attr + '}}';
1174 this.attr = 'src';
1176 if (this.downloadable_file) this.attr += ' ' + this.downloadable_file;
1177 if (!this.attr) this.attr = 'code';
1178 results += this.attr + '>';
1179 this.downloadable_file = "";
1180 this.downloadable_code = false;
1188 if (format_chars[tag] && (this.in_font || this.in_header)) {
1197 if (this.in_endnotes && tag == 'a') return;
1198 if (this.in_link && format_chars[current_tag] && this.link_formats.length) {
1200 } else if (tag == 'a' && !this.link_formats.length) this.in_link = false;
1202 if (this.link_only) {
1203 this.link_only = false;
1209 if (tag == 'sup' && this.attr == 'dwfcknote') {
1212 if (this.is_smiley) {
1213 this.is_smiley = false;
1216 if (tag == 'span' && this.in_font && !ckgedit_xcl_styles) {
1219 …var font_str = '<font ' + this.font_size + '/' + this.font_family + ';;' + this.font_color + ';;' …
1220 var inherits = font_str.match(/(inherit)/g);
1221 if (inherits && inherits.length < 3) HTMLParserFontInfix = true;
1222 var font_start = results.lastIndexOf('__STYLE__');
1223 results = results.splice(font_start, 9, font_str);
1224 results = results.replace(/_FORMAT_SPACE_<font/m, "<font");
1225 this.font_size = 'inherit';
1226 this.font_family = 'inherit';
1227 this.font_color = 'inherit';
1228 this.font_bgcolor = 'inherit';
1229 this.in_font = false;
1231 results = results.replace(/__STYLE__/g, "");
1233 if (tag == 'span' && this.curid) {
1234 this.curid = false;
1237 if (tag == 'dl' && this.downloadable_code) {
1238 this.downloadable_code = false;
1242 this.current_cell.text = results.substring(this.cell_start);
1243 this.current_cell.text = this.current_cell.text.replace(/:::/gm, "");
1244 this.current_cell.text = this.current_cell.text.replace(/^[\s\|\^]+/, "");
1246 if (tag == 'a' && (this.export_code || this.code_snippet)) {
1247 this.export_code = false;
1248 this.code_snippet = false;
1252 if (this.code_type && tag == 'span') tag = 'blank';
1254 if (this.footnote) {
1256 this.footnote = false;
1257 } else if (tag == 'a' && this.xcl_markup) {
1258 this.xcl_markup = false;
1261 this.in_table = false;
1263 results = results.substring(0, this.table_start);
1264 insert_table(this.rows);
1268 if (tag == 'p' && this.in_table) {
1272 if (this.geshi) {
1273 this.geshi = false;
1277 if (tag == 'code' && !this.list_started) { // empty code markup corrupts results
1278 if (results.match(/''\s*$/m)) {
1279 results = results.replace(/''\s*$/, "\n");
1283 } else if (tag == 'a' && this.attr == 'src') {
1284 // if local image without link content, as in <a . . .></a>, delete link markup
1285 if (this.backup('\[\[', '\{')) return;
1288 if (this.end_nested) {
1289 this.end_nested = false;
1293 if ((tag == 'ol' || tag == 'ul') && !this.in_table) {
1294 this.list_level--;
1295 if (!this.list_level) this.format_in_list = false;
1296 if (this.prev_li.length) {
1297 markup['li'] = this.prev_li.pop();
1298 this.end_nested = true;
1302 } else if (tag == 'a' && this.external_mime) {
1303 this.external_mime = false;
1304 if (this.is_mediafile) {
1310 if (this.code_type) {
1311 tag += this.code_type + ">";
1313 var codeinx = results.lastIndexOf('code');
1314 var fileinx = results.lastIndexOf('file');
1316 this.code_type = 'file';
1317 } else this.code_type = 'code';
1318 tag += this.code_type + ">";
1320 this.code_type = false;
1324 } else if (this.attr == 'u' && tag == 'em') {
1331 if (this.last_col_pipes) {
1333 this.last_col_pipes = "";
1336 if (this.td_rowspan && this.rowspan_col == this.td_no + 1) {
1337 this.is_rowspan = false;
1338 this.last_column = this.td_no;
1339 this.td_rowspan--;
1343 this.last_col_pipes = "";
1344 this.in_td = false;
1345 } else if (current_tag.match(/h\d+/)) {
1346 this.in_header = false;
1351 if (results.match(/\n$/) && !this.list_level) {
1358 if (this.in_endnotes && current_tag == 'sup') {
1364 if (this.list_level) {
1365 this.format_in_list = true;
1371 this.last_tag = current_tag;
1373 if (this.td_colspan && !useComplexTables) {
1374 if (this.td_align == 'center') results += ' ';
1379 for (var i = 1; i < this.td_colspan; i++) {
1382 this.last_col_pipes = colspan;
1384 this.td_colspan = false;
1385 } else if (this.td_align == 'center') {
1387 this.td_align = '';
1390 if (current_tag == 'a' && this.link_formats.length) {
1391 var end_str = results.substring(this.link_pos);
1392 var start_str = results.substring(0, this.link_pos);
1395 for (var i = 0; i < this.link_formats.length; i++) {
1396 var fmt = markup[this.link_formats[i]];
1397 … var endfmt = markup_end[this.link_formats[i]] ? markup_end[this.link_formats[i]] : fmt;
1398 start_format += markup[this.link_formats[i]];
1405 this.link_formats = new Array();
1406 this.in_link = false;
1408 this.link_formats = new Array();
1409 this.in_link = false;
1415 text = text.replace(/\t/g, " ");
1416 if (this.code_type == 'code') {
1417 text = text.replace(/(\n?|\s+)\\/gm, "$1CBL__Bksl");
1419 if (text.match(/~~START_HTML_BLOCK~~/)) {
1420 text = text.replace(/~~START_HTML_BLOCK~~\n*/, "~~START_HTML_BLOCK~~\n<code>\n");
1422 if (text.match(/~~CLOSE_HTML_BLOCK~~/)) {
1423 … text = text.replace(/~~CLOSE_HTML_BLOCK~~\n*/gm, "\n</code>\n\n~~CLOSE_HTML_BLOCK~~\n\n");
1427 if (this.interwiki) {
1428 // text = text.replace(String.frasl,"\/");
1430 if (this.interwiki && results.match(/>\w+\s*\|$/)) {
1431 this.interwiki = false;
1432 if (this.attr) {
1435 results = results.replace(/>\w+\s*\|$/, '>' + text);
1439 if (this.in_multi_plugin) {
1440 text = text.replace('&lt; ', '&lt;');
1442 text = text.replace(/&#39;/g, "'"); //replace single quote entities with single quotes
1443 text = text.replace(/^(&gt;)+/, function(match, quotes) {
1444 return (match.replace(/(&gt;)/g, "\__QUOTE__"));
1446 … text = text.replace(/&not;ags/g, '&notags'); //replace &not entity in include notags param
1448 … results = results.replace(/([\/\*_])_FORMAT_SPACE_([\/\*_]{2})_FORMAT_SPACE_$/, "$1$2@@_SP_@@");
1449 if (text.match(/^&\w+;/)) {
1450 …results = results.replace(/_FORMAT_SPACE_\s*$/, ""); // remove unwanted space after character enti…
1453 if (this.link_only) {
1456 results = results.replace(/\}\}\s*$/, replacement);
1460 if (!this.code_type) {
1461 if (!this.last_col_pipes) {
1462 text = text.replace(/\x20{6,}/, " ");
1463 text = text.replace(/^(&nbsp;)+\s*$/, '_FCKG_BLANK_TD_');
1464 text = text.replace(/(&nbsp;)+/, ' ');
1467 if (this.format_tag) {
1468 … if (!this.list_started || this.in_table) text = text.replace(/^\s+/, '@@_SP_@@');
1469 } else if (this.last_tag == 'a') {
1470 text = text.replace(/^\s{2,}/, " ");
1471 } else if (!this.using_fonts) text = text.replace(/^\s+/, '');
1473 if (text.match(/nowiki&gt;/)) {
1477 if (this.format_in_list || (HTMLParserFont && this.list_started)) {
1478 text = text.replace(/^[\n\s]+$/g, '');
1479 if (text.match(/\n{2,}\s{1,}/)) {
1480 text = text.replace(/\n{2,}/, "\n");
1484 if (this.in_td && !text) {
1486 this.in_td = false;
1489 text = text.replace(/&lt;\s/g, '<');
1490 text = text.replace(/\s&gt;/g, '>');
1491 var geshi = text.match(/^\s*geshi:\s+(.*)$/m);
1493 … results = results.replace(/<(code|file)>\s*$/, '<' + "$1" + ' ' + geshi[1] + '>');
1494 text = text.replace(geshi[0], "");
1500 if (this.attr && this.attr == 'dwfcknote') {
1501 if (text.match(/fckgL\d+/)) {
1504 if (text.match(/^[\-,:;!_]/)) {
1514 if (this.downloadable_code && (this.export_code || this.code_snippet)) {
1515 this.downloadable_file = text;
1520 if (this.last_tag == 'a' && text.match(/^[\.,;\:\!]/)) {
1521 results = results.replace(/\s$/, "");
1524 if (this.in_header) {
1525 text = text.replace(/---/g, '&mdash;');
1526 text = text.replace(/--/g, '&ndash;');
1528 if (this.list_started) {
1529 results = results.replace(/_LIST_EOFL_\s*L_BR_K\s*$/, '_LIST_EOFL_');
1531 if (!this.code_type) { // keep special character literals outside of code block
1533 if (!results.match(/\[\[\\\\.*?\|$/) && !text.match(/\w:(\\(\w?))+/)) {
1534 if (!text.match(/\\\\[\w\.\-\_]+\\[\w\.\-\_]+/)) {
1535 text = text.replace(/([\\])/g, '%%$1%%');
1537 text = text.replace(/([\*])/g, '_CKG_ASTERISK_');
1541 if (this.in_endnotes && HTMLParserTopNotes.length) {
1543 if (text.match(/\w/) && !text.match(/^\s*\d\)\s*$/)) {
1544 text = text.replace(/\)\s*$/, "_FN_PAREN_C_");
1545 var index = HTMLParserTopNotes.length - 1;
1546 if (this.bottom_url) {
1547 if (this.link_class && this.link_class == 'media') {
1548 text = '{{' + this.bottom_url + '|' + text + '}}';
1549 } else text = '[[' + this.bottom_url + '|' + text + ']]';
1552 text = text.replace('(', 'L_PARgr');
1553 text = text.replace(')', 'R_PARgr');
1556 text = text.replace('(', 'L_PARgr');
1557 text = text.replace(')', 'R_PARgr');
1561 this.bottom_url = false;
1566 if (text && text.length) {
1570 results = results.replace(/(&\w+;)\s*([\*\/_]{2})_FORMAT_SPACE_(\w+)/, "$1$2$3");
1572 if (this.list_level && this.list_level > 1) {
1573 results = results.replace(/(\[\[.*?\]\])([ ]+[\*\-].*)$/, " $1\n$2");
1577 …var regex = new RegExp('([\*\/\_]{2,})_FORMAT_SPACE_([\*\/\_]{2,})(' + RegExp.escape(text) + ')$');
1578 if (results.match(regex)) {
1580 results = results.replace(regex, "$1$2$3");
1585 if (text.match(/&lt;/)) {
1596 if (text.replace) {
1597 text = text.replace(/^\s+/g, "");
1598 text = text.replace(/^\n$/g, "");
1599 text = text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1616 results = results.replace(/(\[\[\\\\)(.*?)\]\]/gm, function(match, brackets, block) {
1617 block = block.replace(/\\/g, "_SMB_");
1621 results = results.replace(/%%\\%%/g, '_ESC_BKSLASH_');
1622 results = results.replace(/%*\\%*([^\w\\]{1})%*\\%*/g, "$1");
1624 results = results.replace(/_SMB_/g, "\\");
1626 …results = results.replace(/(\s*={2,}).*?CKGE_TMP_(\w+)(.*?).*?CKGE_TMP_c?\2.*?\1/gm, function(m, t…
1627 m = m.replace(/CKGE_TMP_\w+/gm, "");
1628 var v = jQuery("#formatdel").val();
1630 …jQuery('#dw__editform').append('<input type="hidden" id="formatdel" name="formatdel" value="del" /…
1634 results = results.replace(/\s?(CKGE_TMP_\w+)\s?/gm, function(m, tag) {
1639 …results = results.replace(/(\s*={2,})(.*?)(\[\[|\{\{)(.*?)(\]\]|\}\})(.*?)\1/gm, function(m, h_mar…
1640 end_str = end_str.replace(/\[\[(.*?)\|(.*?)\]\]/g, "$2");
1641 end_str = end_str.replace(/\{\{(.*?)\|(.*?)\}\}/g, "$2");
1642 …m = h_markup + " " + whatever + " " + inner.replace(/.*?\|(.*?)/, "$1") + " " + end_str + " " + h_…
1643 var v = jQuery("#formatdel").val();
1645 …jQuery('#dw__editform').append('<input type="hidden" id="formatdel" name="formatdel" value="del" /…
1654 results = results.replace(/\{ \{ rss&gt;Feed:/mg, '{{rss&gt;http://');
1655 results = results.replace(/\{ \{ rss&gt;sFeed:/mg, '{{rss&gt;https://')
1656 results = results.replace(/~ ~ (NOCACHE|NOTOC)~ ~/mg, '~~' + "$1" + '~~');
1659 tag_1 = tag.replace(/oIWIKIo(.*)cIWIKIc/, "$1");
1661 link = link.replace(/\s/, '%20');
1664 …results = results.replace(/\[\[(\w+\.?\w{0,12})>(.*?)\|(.*?)\]\]/gm, function(match, id, iw_replac…
1667 …if ((iw_replace == 'oIWIKIo' + link_text.replace(/\s/, '%20') + 'cIWIKIc') || (iw_replace == link_…
1677 results = results.replace(/>.*?oIWIKIo(.*?)cIWIKIc/mg, '>' + "$1");
1681 …results = results.replace(/\s*([\|\^]+)((\W\W_FORMAT_SPACE_)+)/gm, function(match, pipes, format) {
1682 format = format.replace(/_FORMAT_SPACE_/g, "");
1686 results = results.replace(/&quot;/g, '"');
1688 results = results.replace(regex, " $1");
1690 results = results.replace(/\]\](\*\*|\/\/|\'\'|__|<\/del>)_FORMAT_SPACE_/, "]]$1@@_SP_@@");
1693 results = results.replace(regex, "$1$2$3");
1696 results = results.replace(regex, ' ');
1699 results = results.replace(/([\*\/_]{2})@@_SP_@@(&\w+;)/g, "$1 $2");
1701 results = results.replace(/\n@@_SP_@@\n/g, '');
1702 results = results.replace(/@@_SP_@@\n/g, '');
1703 results = results.replace(/@@_SP_@@/g, ' ');
1704 …var regex = new RegExp(HTMLParser_FORMAT_SPACE + '([^\\)\\]\\}\\{\\-\\.,;:\\!\?"\x94\x92\u201D\u20…
1705 results = results.replace(regex, " $1");
1707 results = results.replace(regex, '');
1711 results = results.replace(/^(\s+[\-\*_]\s*)([\*\/_\']{2})(.*?)(\2)([^\n]*)\n+/gm,
1721 results = results.replace(/(\]\]|\}\})(\s+)(\*|-)/mg,
1723 spaces = spaces.replace(/\n/,"");
1727 …results = results.replace(/(\*|-).*?(\[\[|\{\{).*?(\]\]|\}\})([\s\w\/\-\x3A-\x40\x5B-\x60\x7B-\x7F…
1729 all = all.replace(/[\n]$/, "");
1737 results = results.replace(/(L_BR_K)+/g, line_break_final);
1738 results = results.replace(/L_BR_K/gm, line_break_final);
1739 results = results.replace(/(\\\\)\s+/gm, "$1 \n");
1743 results = results.replace(/\s+<\/(code|file)>/g, "\n</" + "$1" + ">");
1745 results = results.replace(/\s+;/mg, ";");
1746 results = results.replace(/&lt;\s+/mg, "<");
1747 results = results.replace(/\s+&gt;/mg, ">");
1755 results = results.replace(regex, ' ' + line_break_final + ' ');
1758 results = results.replace(/(\||\^)[ ]+(\||\^)\s$/g, "$1\n");
1759 results = results.replace(/(\||\^)[ ]+(\||\^)/g, "$1");
1762 results = results.replace(/_FCKG_BLANK_TD_/g, " ");
1765 results = results.replace(/\/\/&lt;\/\/\s*/g, '&lt;');
1771 String.prototype.font_link_reconcile = function(v) {
1774 regex = /\[\[(.*?)(<font[^\>]+>)([^<]+(\]\])?)[^\>]+\/font>\s*(\]\])/gm;
1775 } else regex = /(<font[^\>\{]+>)\{\{(:?.*?)\|(:?.*?)<\/font>/gm;
1779 this.replace(
1782 a = a.replace(/\n/gm, "");
1783 a = a.replace(/\s/gm, "");
1784 a = a.replace(/[\[\]\{\}]/g, "");
1785 a = a.replace(/\|/g, "");
1786 c = c.replace(/\n/gm, "");
1787 // c = c.replace(/\s/gm, "");
1788 c = c.replace(/[\[\]\}\{]/g, "");
1793 …var val = prompt(LANG.plugins.ckgedit.font_err_1 + "\n" + c + "\n" + LANG.plugins.ckgedit.font_err…
1798 } else throw new Error(LANG.plugins.ckgedit.font_err_throw);
1807 results = results.replace(/<\/font>\s{1}/gm, "</font>");
1811 if (confirm(LANG.plugins.ckgedit.font_conflict)) return;
1812 var v = jQuery("#fontdel").val();
1814 … jQuery('#dw__editform').append('<input type="hidden" id="fontdel" name="fontdel" value="del" />');
1817 results = results.font_link_reconcile(1);
1818 results = results.font_link_reconcile(2);
1821 results = results.replace(regex, function(m) {
1822 m = m.replace(/\s+/g, "");
1826 …results = results.replace(/\[\[(.*?)\|(<font[^\>]+>)(.*?)(<\/font>)\s*(\]\])\s*/gm, function(match…
1828 var v = jQuery("#fontdel").val();
1830 … jQuery('#dw__editform').append('<input type="hidden" id="fontdel" name="fontdel" value="del" />');
1835 …results = results.replace(/(\s*={2,})\s*(.*?)(<font[^\>]+>)(.*?)(<\/font>)(.*?)\s*\1/gm, function(…
1836 match = match.replace(/<\/font>/g, " ");
1837 match = match.replace(/<font.*?>/g, " ");
1838 var v = jQuery("#formatdel").val();
1840 …jQuery('#dw__editform').append('<input type="hidden" id="formatdel" name="formatdel" value="del" /…
1847 if (HTMLParserTopNotes.length) {
1848 results = results.replace(/<sup>\(\(\){2,}\s*<\/sup>/g, "");
1849 results = results.replace(/\(\(+(\d+)\)\)+/, "(($1))");
1851 var matches = i.match(/_(\d+)/);
1853 HTMLParserBottomNotes[i] = HTMLParserBottomNotes[i].replace(/(\d+)_FN_PAREN_C_/, "");
1854 …results = results.replace(pattern, '((' + HTMLParserBottomNotes[i].replace(/_FN_PAREN_C_/g, ") ") …
1856 results = results.replace(/<sup><\/sup>/g, "");
1857 results = results.replace(/((<sup>\(\(\d+\)\)\)?<\/sup>))/mg, function(fn) {
1858 if (!fn.match(/p>\(\(\d+/)) {
1866 results = results.replace(/(={3,}.*?)(\{\{.*?\}\})(.*?={3,})/g, "$1$3\n\n$2");
1868 results = results.replace(/(<sup>)*\s*\[\[\s*\]\]\s*(<\/sup>)*\n*/g, "");
1871 results = results.replace(/<sup>\s*\(\(\d+\)\)\s*<\/sup>/mg, "");
1874 results = results.replace(/<\s+/g, '<');
1875 results = results.replace(/&lt;\s+/g, '<');
1880 <char> is restored in save.php
1885 results = results.replace(/(&lt;nowiki&gt;)(.*?)(&lt;\/nowiki&gt;)/mg,
1887 mid = mid.replace(/%%(.)%%/mg, "NOWIKI_$1_");
1888 return start + mid.replace(regex, "NOWIKI_$1_") + close;
1892 results = results.replace(/__SWF__(\s*)\[*/g, "{{$1");
1893 results = results.replace(/\|.*?\]*(\s*)__FWS__/g, "$1}}");
1894 results = results.replace(/(\s*)__FWS__/g, "$1}}");
1895 results = results.replace(/\n{3,}/g, '\n\n');
1896 results = results.replace(/_LIST_EOFL_/gm, " " + line_break_final + " ");
1899 if (results.indexOf('~~COMPLEX_TABLES~~') == -1) {
1904 results = results.replace(/~~COMPLEX_TABLES~~/gm, "");
1906 results = results.replace(/_CKG_ASTERISK_/gm, '*');
1907 results = results.replace(/_ESC_BKSLASH_/g, '\\');
1908 results = results.replace(/divalNLine/gm, "\n");
1917 dwform.elements.fck_wikitext.value = results;
1924 dom.click();
1929 jQuery(document).ready(function() {
1931 jQuery(document).on("keydown", "input#edit__summary", function(e) {
1932 if (e.which == 13) {
1934 jQuery("#save_button").trigger("mousedown");
1938 jQuery("#ebut_test").mousedown(function() {
1942 jQuery("#ebtn__delete").click(function() {
1950 jQuery("#ebtn__delete").mouseup(function() {
1954 jQuery("#ebtn__dwedit").click(function() {
1958 this.form.submit();
1961 jQuery("#ebtn__fbswitch").click(function() {
1963 document.cookie = 'ckgFbOpt=ckgedit;SameSite=Lax';
1965 document.cookie = 'ckgFbOpt=dokuwiki;SameSite=Lax';
1968 this.form.submit();
1971 jQuery("#ckgedit_draft_btn").click(function() {
1974 jQuery("#backup_button").click(function() {
1977 jQuery("#revert_to_prev_btn").click(function() {
1981 jQuery("#no_styling_btn").click(function() {
1982 this.form.styling.value = "no_styles";
1983 this.form.prefix.value = "";
1984 this.form.suffix.value = "";
1985 this.form.rev.value = "";
1988 jQuery("#ebut_cancel").mouseup(function() {
1989 if (this.form.template && this.form.template.value == 'tpl') return;
1990 if (window.dwfckTextChanged) return;
1993 jQuery("#save_button").mousedown(function() {
1994 if (this.form.template && this.form.template.value == 'tpl') window.dwfckTextChanged = true;
1995 if (!window.dwfckTextChanged && !JSINFO['cg_rev']) {