narf 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +22 -0
- data/lib/web/htmltools/xmltree.rb +2 -2
- data/lib/web/htmltools/xpath.rb +1 -1
- data/narf.gemspec +1 -1
- metadata +2 -460
- data/InstalledFiles +0 -2227
- data/config.save +0 -12
- data/doc/apache_cgi.txt~ +0 -17
- data/doc/fastcgi.txt~ +0 -19
- data/doc/rdoc/classes/Web.html +0 -369
- data/doc/rdoc/classes/Web.src/M000002.html +0 -15
- data/doc/rdoc/classes/Web.src/M000003.html +0 -15
- data/doc/rdoc/classes/Web.src/M000004.html +0 -15
- data/doc/rdoc/classes/Web.src/M000005.html +0 -15
- data/doc/rdoc/classes/Web.src/M000006.html +0 -20
- data/doc/rdoc/classes/Web.src/M000007.html +0 -18
- data/doc/rdoc/classes/Web.src/M000008.html +0 -18
- data/doc/rdoc/classes/Web.src/M000009.html +0 -18
- data/doc/rdoc/classes/Web.src/M000010.html +0 -15
- data/doc/rdoc/classes/Web.src/M000011.html +0 -15
- data/doc/rdoc/classes/Web.src/M000012.html +0 -15
- data/doc/rdoc/classes/Web/CGD.html +0 -173
- data/doc/rdoc/classes/Web/CGD.src/M000037.html +0 -24
- data/doc/rdoc/classes/Web/CGD.src/M000038.html +0 -24
- data/doc/rdoc/classes/Web/CGD.src/M000039.html +0 -15
- data/doc/rdoc/classes/Web/CGD.src/M000040.html +0 -15
- data/doc/rdoc/classes/Web/CGD.src/M000041.html +0 -23
- data/doc/rdoc/classes/Web/CGI.html +0 -946
- data/doc/rdoc/classes/Web/CGI.src/M000051.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000052.html +0 -24
- data/doc/rdoc/classes/Web/CGI.src/M000053.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000054.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000055.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000056.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000057.html +0 -17
- data/doc/rdoc/classes/Web/CGI.src/M000058.html +0 -34
- data/doc/rdoc/classes/Web/CGI.src/M000059.html +0 -22
- data/doc/rdoc/classes/Web/CGI.src/M000060.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000061.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000062.html +0 -19
- data/doc/rdoc/classes/Web/CGI.src/M000063.html +0 -18
- data/doc/rdoc/classes/Web/CGI.src/M000064.html +0 -19
- data/doc/rdoc/classes/Web/CGI.src/M000065.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000066.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000067.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000068.html +0 -13
- data/doc/rdoc/classes/Web/CGI.src/M000069.html +0 -13
- data/doc/rdoc/classes/Web/CGI.src/M000070.html +0 -13
- data/doc/rdoc/classes/Web/CGI.src/M000071.html +0 -13
- data/doc/rdoc/classes/Web/CGI.src/M000072.html +0 -19
- data/doc/rdoc/classes/Web/CGI.src/M000073.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000074.html +0 -19
- data/doc/rdoc/classes/Web/CGI.src/M000075.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000076.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000077.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000078.html +0 -20
- data/doc/rdoc/classes/Web/CGI.src/M000079.html +0 -36
- data/doc/rdoc/classes/Web/CGI.src/M000080.html +0 -19
- data/doc/rdoc/classes/Web/CGI.src/M000081.html +0 -18
- data/doc/rdoc/classes/Web/CGI.src/M000082.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000083.html +0 -17
- data/doc/rdoc/classes/Web/CGI.src/M000084.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000085.html +0 -16
- data/doc/rdoc/classes/Web/CGI.src/M000086.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000087.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000088.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000089.html +0 -16
- data/doc/rdoc/classes/Web/CGI.src/M000090.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000091.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000092.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000093.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000094.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000095.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000096.html +0 -19
- data/doc/rdoc/classes/Web/CGI.src/M000097.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000098.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000099.html +0 -43
- data/doc/rdoc/classes/Web/CGI.src/M000100.html +0 -18
- data/doc/rdoc/classes/Web/CGI.src/M000101.html +0 -20
- data/doc/rdoc/classes/Web/CGI.src/M000102.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000103.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000104.html +0 -15
- data/doc/rdoc/classes/Web/CGI.src/M000105.html +0 -24
- data/doc/rdoc/classes/Web/CGI.src/M000106.html +0 -24
- data/doc/rdoc/classes/Web/CGI.src/M000107.html +0 -22
- data/doc/rdoc/classes/Web/CaseInsensitiveHash.html +0 -104
- data/doc/rdoc/classes/Web/CaseInsensitiveHash.src/M000118.html +0 -15
- data/doc/rdoc/classes/Web/CaseInsensitiveHash.src/M000119.html +0 -15
- data/doc/rdoc/classes/Web/CaseInsensitiveHash.src/M000120.html +0 -15
- data/doc/rdoc/classes/Web/Mime.html +0 -122
- data/doc/rdoc/classes/Web/Mime.src/M000118.html +0 -15
- data/doc/rdoc/classes/Web/Mime.src/M000119.html +0 -15
- data/doc/rdoc/classes/Web/Mime.src/M000120.html +0 -23
- data/doc/rdoc/classes/Web/Mime.src/M000121.html +0 -15
- data/doc/rdoc/classes/Web/Mime.src/M000122.html +0 -15
- data/doc/rdoc/classes/Web/Mime.src/M000123.html +0 -23
- data/doc/rdoc/classes/Web/Mime.src/M000124.html +0 -15
- data/doc/rdoc/classes/Web/Narflates.html +0 -134
- data/doc/rdoc/classes/Web/Parser.html +0 -219
- data/doc/rdoc/classes/Web/Parser.src/M000013.html +0 -21
- data/doc/rdoc/classes/Web/Parser.src/M000014.html +0 -19
- data/doc/rdoc/classes/Web/Parser.src/M000015.html +0 -21
- data/doc/rdoc/classes/Web/Parser.src/M000016.html +0 -15
- data/doc/rdoc/classes/Web/Parser.src/M000017.html +0 -30
- data/doc/rdoc/classes/Web/Parser.src/M000018.html +0 -15
- data/doc/rdoc/classes/Web/Parser.src/M000019.html +0 -19
- data/doc/rdoc/classes/Web/Parser.src/M000020.html +0 -27
- data/doc/rdoc/classes/Web/Parser.src/M000021.html +0 -15
- data/doc/rdoc/classes/Web/Parser.src/M000022.html +0 -16
- data/doc/rdoc/classes/Web/Parser.src/M000023.html +0 -18
- data/doc/rdoc/classes/Web/Session.html +0 -178
- data/doc/rdoc/classes/Web/Session.src/M000042.html +0 -20
- data/doc/rdoc/classes/Web/Session.src/M000043.html +0 -19
- data/doc/rdoc/classes/Web/Session.src/M000044.html +0 -21
- data/doc/rdoc/classes/Web/Session.src/M000045.html +0 -21
- data/doc/rdoc/classes/Web/Session.src/M000046.html +0 -15
- data/doc/rdoc/classes/Web/Session.src/M000047.html +0 -17
- data/doc/rdoc/classes/Web/Session.src/M000048.html +0 -15
- data/doc/rdoc/classes/Web/Session.src/M000049.html +0 -15
- data/doc/rdoc/classes/Web/Session.src/M000050.html +0 -16
- data/doc/rdoc/classes/Web/Testing.html +0 -474
- data/doc/rdoc/classes/Web/Testing.src/M000024.html +0 -15
- data/doc/rdoc/classes/Web/Testing.src/M000025.html +0 -25
- data/doc/rdoc/classes/Web/Testing.src/M000026.html +0 -15
- data/doc/rdoc/classes/Web/Testing.src/M000027.html +0 -25
- data/doc/rdoc/classes/Web/Testing.src/M000028.html +0 -57
- data/doc/rdoc/classes/Web/Testing.src/M000029.html +0 -15
- data/doc/rdoc/classes/Web/Testing.src/M000030.html +0 -15
- data/doc/rdoc/classes/Web/Testing.src/M000031.html +0 -15
- data/doc/rdoc/classes/Web/Testing.src/M000032.html +0 -15
- data/doc/rdoc/classes/Web/Testing.src/M000033.html +0 -15
- data/doc/rdoc/classes/Web/Testing.src/M000034.html +0 -15
- data/doc/rdoc/classes/Web/Testing.src/M000035.html +0 -15
- data/doc/rdoc/classes/Web/Testing.src/M000036.html +0 -18
- data/doc/rdoc/classes/Web/Upload.html +0 -160
- data/doc/rdoc/classes/Web/Upload.src/M000108.html +0 -25
- data/doc/rdoc/classes/Web/Upload.src/M000109.html +0 -18
- data/doc/rdoc/classes/Web/Upload.src/M000110.html +0 -16
- data/doc/rdoc/classes/Web/Upload.src/M000111.html +0 -16
- data/doc/rdoc/classes/Web/Wiki.html +0 -249
- data/doc/rdoc/classes/Web/Wiki.src/M000112.html +0 -25
- data/doc/rdoc/classes/Web/Wiki.src/M000113.html +0 -15
- data/doc/rdoc/classes/Web/Wiki.src/M000114.html +0 -26
- data/doc/rdoc/classes/Web/Wiki.src/M000115.html +0 -21
- data/doc/rdoc/classes/Web/Wiki.src/M000116.html +0 -18
- data/doc/rdoc/classes/Web/Wiki.src/M000117.html +0 -19
- data/doc/rdoc/created.rid +0 -1
- data/doc/rdoc/files/README.html +0 -230
- data/doc/rdoc/files/doc/apache_cgi_txt.html +0 -76
- data/doc/rdoc/files/doc/fastcgi_txt.html +0 -82
- data/doc/rdoc/files/doc/mod_ruby_txt.html +0 -62
- data/doc/rdoc/files/doc/webrick_txt.html +0 -79
- data/doc/rdoc/files/examples/examples_rdoc.html +0 -73
- data/doc/rdoc/files/lib/web/cgi_rb.html +0 -75
- data/doc/rdoc/files/lib/web/mime_rb.html +0 -67
- data/doc/rdoc/files/lib/web/parser_rb.html +0 -73
- data/doc/rdoc/files/lib/web/session_rb.html +0 -73
- data/doc/rdoc/files/lib/web/template_rb.html +0 -73
- data/doc/rdoc/files/lib/web/testing_rb.html +0 -67
- data/doc/rdoc/files/lib/web/upload_rb.html +0 -73
- data/doc/rdoc/files/lib/web/wiki_rb.html +0 -79
- data/doc/rdoc/files/lib/web_rb.html +0 -116
- data/doc/rdoc/files/lib/web_rb.src/M000001.html +0 -15
- data/doc/rdoc/fr_class_index.html +0 -47
- data/doc/rdoc/fr_file_index.html +0 -52
- data/doc/rdoc/fr_method_index.html +0 -158
- data/doc/rdoc/index.html +0 -22
- data/doc/rdoc/rdoc-style.css +0 -99
- data/examples/admin.rb~ +0 -5
- data/examples/cookbook.rdoc~ +0 -238
- data/examples/examples.rdoc~ +0 -17
- data/examples/hello.world.rb~ +0 -3
- data/examples/session.rb~ +0 -31
- data/examples/test/test.hello.world.rb~ +0 -9
- data/examples/test/test.session.rb~ +0 -37
- data/examples/wiki.rb~ +0 -5
- data/lib/web.rb~ +0 -290
- data/lib/web/#assertinclude.rb# +0 -110
- data/lib/web/assertinclude.rb~ +0 -110
- data/lib/web/cgi.rb~ +0 -640
- data/lib/web/htmlparser/html-parser.rb~ +0 -429
- data/lib/web/htmlparser/sgml-parser.rb~ +0 -332
- data/lib/web/htmltools/element.rb~ +0 -296
- data/lib/web/htmltools/stparser.rb~ +0 -276
- data/lib/web/htmltools/tags.rb~ +0 -286
- data/lib/web/htmltools/tree.rb~ +0 -139
- data/lib/web/htmltools/xmltree.rb~ +0 -160
- data/lib/web/htmltools/xpath.rb~ +0 -71
- data/lib/web/parser.rb~ +0 -288
- data/lib/web/request.rb~ +0 -238
- data/lib/web/runner.rb~ +0 -26
- data/lib/web/sapi/fastcgi.rb~ +0 -25
- data/lib/web/sapi/mod_ruby.rb~ +0 -46
- data/lib/web/sapi/webrick.rb~ +0 -89
- data/lib/web/session.rb~ +0 -75
- data/lib/web/tagparser.rb~ +0 -96
- data/lib/web/template.rb~ +0 -613
- data/lib/web/testing.rb~ +0 -546
- data/lib/web/unit/response.rb~ +0 -461
- data/lib/web/unit/ui/cui/testrunner.rb~ +0 -50
- data/lib/web/upload.rb~ +0 -262
- data/lib/web/wiki.rb~ +0 -517
- data/lib/web/wiki/linker.rb~ +0 -72
- data/lib/web/wiki/mime.rb~ +0 -68
- data/lib/web/wiki/page.rb~ +0 -192
- data/lib/web/wiki/resources/#edit.html# +0 -65
- data/lib/web/wiki/resources/admin.html~ +0 -13
- data/lib/web/wiki/resources/default-content_editor.html~ +0 -1
- data/lib/web/wiki/resources/edit.html~ +0 -2
- data/lib/web/wiki/resources/home.html~ +0 -10
- data/lib/web/wiki/resources/htmlarea/ChangeLog +0 -1185
- data/lib/web/wiki/resources/htmlarea/dialog.js +0 -72
- data/lib/web/wiki/resources/htmlarea/examples/2-areas.cgi +0 -16
- data/lib/web/wiki/resources/htmlarea/examples/2-areas.html +0 -158
- data/lib/web/wiki/resources/htmlarea/examples/context-menu.html +0 -95
- data/lib/web/wiki/resources/htmlarea/examples/core.html +0 -184
- data/lib/web/wiki/resources/htmlarea/examples/css.html +0 -88
- data/lib/web/wiki/resources/htmlarea/examples/custom.css +0 -29
- data/lib/web/wiki/resources/htmlarea/examples/full-page.html +0 -75
- data/lib/web/wiki/resources/htmlarea/examples/fully-loaded.html +0 -248
- data/lib/web/wiki/resources/htmlarea/examples/index.html +0 -40
- data/lib/web/wiki/resources/htmlarea/examples/spell-checker.html +0 -132
- data/lib/web/wiki/resources/htmlarea/examples/table-operations.html +0 -116
- data/lib/web/wiki/resources/htmlarea/examples/test.cgi +0 -21
- data/lib/web/wiki/resources/htmlarea/htmlarea.css +0 -180
- data/lib/web/wiki/resources/htmlarea/htmlarea.js +0 -2175
- data/lib/web/wiki/resources/htmlarea/images/ed_about.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_align_center.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_align_justify.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_align_left.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_align_right.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_blank.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_charmap.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_color_bg.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_color_fg.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_copy.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_custom.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_cut.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_delete.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_format_bold.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_format_italic.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_format_strike.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_format_sub.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_format_sup.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_format_underline.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_help.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_hr.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_html.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_image.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_indent_less.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_indent_more.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_left_to_right.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_link.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_list_bullet.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_list_num.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_paste.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_redo.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_right_to_left.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_save.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_show_border.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_splitcel.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/ed_undo.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/fullscreen_maximize.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/fullscreen_minimize.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/images/insert_table.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/index.html +0 -199
- data/lib/web/wiki/resources/htmlarea/lang/b5.js +0 -36
- data/lib/web/wiki/resources/htmlarea/lang/cz.js +0 -63
- data/lib/web/wiki/resources/htmlarea/lang/da.js +0 -38
- data/lib/web/wiki/resources/htmlarea/lang/de.js +0 -54
- data/lib/web/wiki/resources/htmlarea/lang/ee.js +0 -63
- data/lib/web/wiki/resources/htmlarea/lang/el.js +0 -75
- data/lib/web/wiki/resources/htmlarea/lang/en.js +0 -88
- data/lib/web/wiki/resources/htmlarea/lang/es.js +0 -51
- data/lib/web/wiki/resources/htmlarea/lang/fi.js +0 -46
- data/lib/web/wiki/resources/htmlarea/lang/fr.js +0 -61
- data/lib/web/wiki/resources/htmlarea/lang/gb.js +0 -36
- data/lib/web/wiki/resources/htmlarea/lang/he.js +0 -63
- data/lib/web/wiki/resources/htmlarea/lang/hu.js +0 -63
- data/lib/web/wiki/resources/htmlarea/lang/it.js +0 -54
- data/lib/web/wiki/resources/htmlarea/lang/ja-euc.js +0 -37
- data/lib/web/wiki/resources/htmlarea/lang/ja-jis.js +0 -37
- data/lib/web/wiki/resources/htmlarea/lang/ja-sjis.js +0 -37
- data/lib/web/wiki/resources/htmlarea/lang/ja-utf8.js +0 -37
- data/lib/web/wiki/resources/htmlarea/lang/lt.js +0 -55
- data/lib/web/wiki/resources/htmlarea/lang/lv.js +0 -55
- data/lib/web/wiki/resources/htmlarea/lang/nb.js +0 -36
- data/lib/web/wiki/resources/htmlarea/lang/nl.js +0 -90
- data/lib/web/wiki/resources/htmlarea/lang/no.js +0 -79
- data/lib/web/wiki/resources/htmlarea/lang/pl.js +0 -36
- data/lib/web/wiki/resources/htmlarea/lang/pt_br.js +0 -37
- data/lib/web/wiki/resources/htmlarea/lang/ro.js +0 -80
- data/lib/web/wiki/resources/htmlarea/lang/ru.js +0 -63
- data/lib/web/wiki/resources/htmlarea/lang/se.js +0 -38
- data/lib/web/wiki/resources/htmlarea/lang/si.js +0 -63
- data/lib/web/wiki/resources/htmlarea/lang/vn.js +0 -51
- data/lib/web/wiki/resources/htmlarea/license.txt +0 -30
- data/lib/web/wiki/resources/htmlarea/plugins/CSS/css.js +0 -116
- data/lib/web/wiki/resources/htmlarea/plugins/CSS/lang/en.js +0 -2
- data/lib/web/wiki/resources/htmlarea/plugins/ContextMenu/context-menu.js +0 -416
- data/lib/web/wiki/resources/htmlarea/plugins/ContextMenu/lang/de.js +0 -59
- data/lib/web/wiki/resources/htmlarea/plugins/ContextMenu/lang/el.js +0 -57
- data/lib/web/wiki/resources/htmlarea/plugins/ContextMenu/lang/en.js +0 -66
- data/lib/web/wiki/resources/htmlarea/plugins/ContextMenu/lang/nl.js +0 -66
- data/lib/web/wiki/resources/htmlarea/plugins/ContextMenu/menu.css +0 -64
- data/lib/web/wiki/resources/htmlarea/plugins/FullPage/full-page.js +0 -143
- data/lib/web/wiki/resources/htmlarea/plugins/FullPage/img/docprop.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/FullPage/lang/en.js +0 -25
- data/lib/web/wiki/resources/htmlarea/plugins/FullPage/lang/ro.js +0 -25
- data/lib/web/wiki/resources/htmlarea/plugins/FullPage/popups/docprop.html +0 -131
- data/lib/web/wiki/resources/htmlarea/plugins/FullPage/test.html +0 -89
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/img/spell-check.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/lang/cz.js +0 -37
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/lang/da.js +0 -37
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/lang/de.js +0 -28
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/lang/en.js +0 -38
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/lang/hu.js +0 -37
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/lang/it.js +0 -28
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/lang/ro.js +0 -37
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/readme-tech.html +0 -114
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/spell-check-logic.cgi +0 -210
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/spell-check-style.css +0 -10
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/spell-check-ui.html +0 -122
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/spell-check-ui.js +0 -397
- data/lib/web/wiki/resources/htmlarea/plugins/SpellChecker/spell-checker.js +0 -79
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/cell-delete.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/cell-insert-after.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/cell-insert-before.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/cell-merge.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/cell-prop.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/cell-split.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/col-delete.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/col-insert-after.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/col-insert-before.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/col-split.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/row-delete.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/row-insert-above.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/row-insert-under.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/row-prop.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/row-split.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/img/table-prop.gif +0 -0
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/lang/cz.js +0 -90
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/lang/da.js +0 -90
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/lang/de.js +0 -81
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/lang/el.js +0 -81
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/lang/en.js +0 -90
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/lang/fi.js +0 -66
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/lang/hu.js +0 -63
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/lang/it.js +0 -81
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/lang/nl.js +0 -90
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/lang/no.js +0 -91
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/lang/ro.js +0 -90
- data/lib/web/wiki/resources/htmlarea/plugins/TableOperations/table-operations.js +0 -1160
- data/lib/web/wiki/resources/htmlarea/popupdiv.js +0 -369
- data/lib/web/wiki/resources/htmlarea/popups/about.html +0 -378
- data/lib/web/wiki/resources/htmlarea/popups/blank.html +0 -2
- data/lib/web/wiki/resources/htmlarea/popups/custom2.html +0 -35
- data/lib/web/wiki/resources/htmlarea/popups/editor_help.html +0 -16
- data/lib/web/wiki/resources/htmlarea/popups/fullscreen.html +0 -133
- data/lib/web/wiki/resources/htmlarea/popups/insert_image.html +0 -191
- data/lib/web/wiki/resources/htmlarea/popups/insert_table.html +0 -174
- data/lib/web/wiki/resources/htmlarea/popups/link.html +0 -142
- data/lib/web/wiki/resources/htmlarea/popups/old-fullscreen.html +0 -131
- data/lib/web/wiki/resources/htmlarea/popups/old_insert_image.html +0 -206
- data/lib/web/wiki/resources/htmlarea/popups/popup.js +0 -109
- data/lib/web/wiki/resources/htmlarea/popups/select_color.html +0 -347
- data/lib/web/wiki/resources/htmlarea/popupwin.js +0 -139
- data/lib/web/wiki/resources/htmlarea/reference.html +0 -523
- data/lib/web/wiki/resources/htmlarea/release-notes.html +0 -165
- data/lib/web/wiki/resources/illustration.html~ +0 -1
- data/lib/web/wiki/resources/index.html~ +0 -4
- data/lib/web/wiki/resources/more_news.html~ +0 -5
- data/lib/web/wiki/resources/more_news_rss_0.91.html +0 -23
- data/lib/web/wiki/resources/page_history.html~ +0 -19
- data/lib/web/wiki/resources/template.html~ +0 -13
- data/narf.gemspec~ +0 -40
- data/sapi/apache_cgi/INSTALL.txt~ +0 -9
- data/sapi/apache_cgi/README~ +0 -0
- data/sapi/fastcgi/INSTALL.txt~ +0 -17
- data/sapi/mod_ruby/INSTALL.txt~ +0 -5
- data/sapi/webrick/INSTALL.txt~ +0 -21
- data/sapi/webrick/run_webrick.rb~ +0 -16
- data/scripts/makedist.rb~ +0 -49
- data/test/mod_ruby_stub.rb~ +0 -38
- data/test/test.action.rb~ +0 -142
- data/test/test.assertinclude.rb~ +0 -109
- data/test/test.narf.cgi.rb~ +0 -105
- data/test/test.request.rb~ +0 -328
- data/test/test.response.rb~ +0 -556
- data/test/test.template.rb~ +0 -832
- data/test/test.web.test.rb~ +0 -461
- data/test/webunit/test_cookie.rb~ +0 -128
- data/test/webunit/test_form.rb~ +0 -43
- data/test/webunit/test_multipart.rb~ +0 -53
- data/test/webunit/test_params.rb~ +0 -211
- data/test/webunit/test_response.rb~ +0 -145
- data/test/webunit/test_site/assert.html~ +0 -1
- data/test/webunit/test_site/auth/index.html~ +0 -1
- data/test/webunit/test_site/badtags.html~ +0 -1
- data/test/webunit/test_site/cookie.cgi~ +0 -35
- data/test/webunit/test_site/document.xml~ +0 -1
- data/test/webunit/test_site/form.html~ +0 -1
- data/test/webunit/test_site/frame-0.html~ +0 -1
- data/test/webunit/test_site/frame-1.html~ +0 -1
- data/test/webunit/test_site/frame.html~ +0 -1
- data/test/webunit/test_site/image.html~ +0 -1
- data/test/webunit/test_site/include.cgi~ +0 -10
- data/test/webunit/test_site/jscript-0.html~ +0 -1
- data/test/webunit/test_site/jscript-1.html~ +0 -1
- data/test/webunit/test_site/jscript.html~ +0 -1
- data/test/webunit/test_site/link.html~ +0 -1
- data/test/webunit/test_site/multipart.cgi~ +0 -25
- data/test/webunit/test_site/multipart.html~ +0 -1
- data/test/webunit/test_site/params.html~ +0 -1
- data/test/webunit/test_site/redirect.cgi~ +0 -14
- data/test/webunit/test_site/response.html~ +0 -1
- data/test/webunit/test_site/simple.cgi~ +0 -17
- data/test/webunit/test_site/stock.cgi~ +0 -34
- data/test/webunit/test_site/table.html~ +0 -1
- data/test/webunit/test_site/test.cgi~ +0 -25
- data/test/wiki/test.history.rb~ +0 -254
- data/test/wiki/test.illustration_page.rb~ +0 -287
- data/test/wiki/test.tarpit.rb~ +0 -40
- data/test/wiki/test.wiki.rb~ +0 -295
@@ -1,28 +0,0 @@
|
|
1
|
-
// I18N constants
|
2
|
-
|
3
|
-
// LANG: "it", ENCODING: UTF-8 | ISO-8859-1
|
4
|
-
// Author: Fabio Rotondo, <fabio@rotondo.it>
|
5
|
-
|
6
|
-
SpellChecker.I18N = {
|
7
|
-
"CONFIRM_LINK_CLICK" : "Devi confermare l'apertura di questo link",
|
8
|
-
"Cancel" : "Annulla",
|
9
|
-
"Dictionary" : "Dizionario",
|
10
|
-
"Finished list of mispelled words" : "La lista delle parole scritte male è terminata",
|
11
|
-
"I will open it in a new page." : "Lo aprirò in una nuova pagina.",
|
12
|
-
"Ignore all" : "Ignora sempre",
|
13
|
-
"Ignore" : "Ignora",
|
14
|
-
"NO_ERRORS" : "Non sono state trovate parole scritte male con il dizionario selezionato.",
|
15
|
-
"NO_ERRORS_CLOSING" : "Controllo completato, non sono state trovate parole scritte male. Sto chiudendo...",
|
16
|
-
"OK" : "OK",
|
17
|
-
"Original word" : "Parola originale",
|
18
|
-
"Please wait. Calling spell checker." : "Attendere. Sto invocando lo Spell Checker.",
|
19
|
-
"Please wait: changing dictionary to" : "Attendere. Cambio il dizionario in",
|
20
|
-
"QUIT_CONFIRMATION" : "Questo annullerà le modifiche e chiuderà lo Spell Checker. Conferma.",
|
21
|
-
"Re-check" : "Ricontrolla",
|
22
|
-
"Replace all" : "Sostituisci sempre",
|
23
|
-
"Replace with" : "Stostituisci con",
|
24
|
-
"Replace" : "Sostituisci",
|
25
|
-
"SC-spell-check" : "Spell-check",
|
26
|
-
"Suggestions" : "Suggerimenti",
|
27
|
-
"pliz weit ;-)" : "Attendere Prego ;-)"
|
28
|
-
};
|
@@ -1,37 +0,0 @@
|
|
1
|
-
// I18N constants
|
2
|
-
|
3
|
-
// LANG: "ro", ENCODING: UTF-8
|
4
|
-
// Author: Mihai Bazon, http://dynarch.com/mishoo
|
5
|
-
|
6
|
-
// FOR TRANSLATORS:
|
7
|
-
//
|
8
|
-
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
9
|
-
// (at least a valid email address)
|
10
|
-
//
|
11
|
-
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
12
|
-
// (if this is not possible, please include a comment
|
13
|
-
// that states what encoding is necessary.)
|
14
|
-
|
15
|
-
SpellChecker.I18N = {
|
16
|
-
"CONFIRM_LINK_CLICK" : "Vă rog confirmaţi că vreţi să deschideţi acest link",
|
17
|
-
"Cancel" : "Anulează",
|
18
|
-
"Dictionary" : "Dicţionar",
|
19
|
-
"Finished list of mispelled words" : "Am terminat lista de cuvinte greşite",
|
20
|
-
"I will open it in a new page." : "O voi deschide într-o altă fereastră.",
|
21
|
-
"Ignore all" : "Ignoră toate",
|
22
|
-
"Ignore" : "Ignoră",
|
23
|
-
"NO_ERRORS" : "Nu am găsit nici un cuvânt greşit cu acest dicţionar.",
|
24
|
-
"NO_ERRORS_CLOSING" : "Am terminat, nu am detectat nici o greşeală. Acum închid fereastra...",
|
25
|
-
"OK" : "OK",
|
26
|
-
"Original word" : "Cuvântul original",
|
27
|
-
"Please wait. Calling spell checker." : "Vă rog aşteptaţi. Apelez spell-checker-ul.",
|
28
|
-
"Please wait: changing dictionary to" : "Vă rog aşteptaţi. Schimb dicţionarul cu",
|
29
|
-
"QUIT_CONFIRMATION" : "Doriţi să renunţaţi la modificări şi să închid spell-checker-ul?",
|
30
|
-
"Re-check" : "Scanează",
|
31
|
-
"Replace all" : "Înlocuieşte toate",
|
32
|
-
"Replace with" : "Înlocuieşte cu",
|
33
|
-
"Replace" : "Înlocuieşte",
|
34
|
-
"SC-spell-check" : "Detectează greşeli",
|
35
|
-
"Suggestions" : "Sugestii",
|
36
|
-
"pliz weit ;-)" : "va rog ashteptatzi ;-)"
|
37
|
-
};
|
@@ -1,114 +0,0 @@
|
|
1
|
-
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>HTMLArea Spell Checker</title>
|
5
|
-
</head>
|
6
|
-
|
7
|
-
<body>
|
8
|
-
<h1>HTMLArea Spell Checker</h1>
|
9
|
-
|
10
|
-
<p>The HTMLArea Spell Checker subsystem consists of the following
|
11
|
-
files:</p>
|
12
|
-
|
13
|
-
<ul>
|
14
|
-
|
15
|
-
<li>spell-checker.js — the spell checker plugin interface for
|
16
|
-
HTMLArea</li>
|
17
|
-
|
18
|
-
<li>spell-checker-ui.html — the HTML code for the user
|
19
|
-
interface</li>
|
20
|
-
|
21
|
-
<li>spell-checker-ui.js — functionality of the user
|
22
|
-
interface</li>
|
23
|
-
|
24
|
-
<li>spell-checker-logic.cgi — Perl CGI script that checks a text
|
25
|
-
given through POST for spelling errors</li>
|
26
|
-
|
27
|
-
<li>spell-checker-style.css — style for mispelled words</li>
|
28
|
-
|
29
|
-
<li>lang/en.js — main language file (English).</li>
|
30
|
-
|
31
|
-
</ul>
|
32
|
-
|
33
|
-
<h2>Process overview</h2>
|
34
|
-
|
35
|
-
<p>
|
36
|
-
When an end-user clicks the "spell-check" button in the HTMLArea
|
37
|
-
editor, a new window is opened with the URL of "spell-check-ui.html".
|
38
|
-
This window initializes itself with the text found in the editor (uses
|
39
|
-
<tt>window.opener.SpellChecker.editor</tt> global variable) and it
|
40
|
-
submits the text to the server-side script "spell-check-logic.cgi".
|
41
|
-
The target of the FORM is an inline frame which is used both to
|
42
|
-
display the text and correcting.
|
43
|
-
</p>
|
44
|
-
|
45
|
-
<p>
|
46
|
-
Further, spell-check-logic.cgi calls Aspell for each portion of plain
|
47
|
-
text found in the given HTML. It rebuilds an HTML file that contains
|
48
|
-
clear marks of which words are incorrect, along with suggestions for
|
49
|
-
each of them. This file is then loaded in the inline frame. Upon
|
50
|
-
loading, a JavaScript function from "spell-check-ui.js" is called.
|
51
|
-
This function will retrieve all mispelled words from the HTML of the
|
52
|
-
iframe and will setup the user interface so that it allows correction.
|
53
|
-
</p>
|
54
|
-
|
55
|
-
<h2>The server-side script (spell-check-logic.cgi)</h2>
|
56
|
-
|
57
|
-
<p>
|
58
|
-
<strong>Unicode safety</strong> — the program <em>is</em>
|
59
|
-
Unicode safe. HTML entities are expanded into their corresponding
|
60
|
-
Unicode characters. These characters will be matched as part of the
|
61
|
-
word passed to Aspell. All texts passed to Aspell are in Unicode
|
62
|
-
(when appropriate). <strike>However, Aspell seems to not support Unicode
|
63
|
-
yet (<a
|
64
|
-
href="http://mail.gnu.org/archive/html/aspell-user/2000-11/msg00007.html">thread concerning Aspell and Unicode</a>).
|
65
|
-
This mean that words containing Unicode
|
66
|
-
characters that are not in 0..255 are likely to be reported as "mispelled" by Aspell.</strike>
|
67
|
-
</p>
|
68
|
-
|
69
|
-
<p>
|
70
|
-
<strong style="font-variant: small-caps; color:
|
71
|
-
red;">Update:</strong> though I've never seen it mentioned
|
72
|
-
anywhere, it looks that Aspell <em>does</em>, in fact, speak
|
73
|
-
Unicode. Or else, maybe <code>Text::Aspell</code> does
|
74
|
-
transparent conversion; anyway, this new version of our
|
75
|
-
SpellChecker plugin is, as tests show so far, fully
|
76
|
-
Unicode-safe... well, probably the <em>only</em> freeware
|
77
|
-
Web-based spell-checker which happens to have Unicode support.
|
78
|
-
</p>
|
79
|
-
|
80
|
-
<p>
|
81
|
-
The Perl Unicode manual (man perluniintro) states:
|
82
|
-
</p>
|
83
|
-
|
84
|
-
<blockquote>
|
85
|
-
<em>
|
86
|
-
Starting from Perl 5.6.0, Perl has had the capacity to handle Unicode
|
87
|
-
natively. Perl 5.8.0, however, is the first recommended release for
|
88
|
-
serious Unicode work. The maintenance release 5.6.1 fixed many of the
|
89
|
-
problems of the initial Unicode implementation, but for example regular
|
90
|
-
expressions still do not work with Unicode in 5.6.1.
|
91
|
-
</em>
|
92
|
-
</blockquote>
|
93
|
-
|
94
|
-
<p>In other words, do <em>not</em> assume that this script is
|
95
|
-
Unicode-safe on Perl interpreters older than 5.8.0.</p>
|
96
|
-
|
97
|
-
<p>The following Perl modules are required:</p>
|
98
|
-
|
99
|
-
<ul>
|
100
|
-
<li><a href="http://search.cpan.org/search?query=Text%3A%3AAspell&mode=all" target="_blank">Text::Aspell</a></li>
|
101
|
-
<li><a href="http://search.cpan.org/search?query=XML%3A%3ADOM&mode=all" target="_blank">XML::DOM</a></li>
|
102
|
-
<li><a href="http://search.cpan.org/search?query=CGI&mode=all" target="_blank">CGI</a></li>
|
103
|
-
</ul>
|
104
|
-
|
105
|
-
<p>Of these, only Text::Aspell might need to be installed manually. The
|
106
|
-
others are likely to be available by default in most Perl distributions.</p>
|
107
|
-
|
108
|
-
<hr />
|
109
|
-
<address><a href="http://dynarch.com/mishoo/">Mihai Bazon</a></address>
|
110
|
-
<!-- Created: Thu Jul 17 13:22:27 EEST 2003 -->
|
111
|
-
<!-- hhmts start --> Last modified: Fri Jan 30 19:14:11 EET 2004 <!-- hhmts end -->
|
112
|
-
<!-- doc-lang: English -->
|
113
|
-
</body>
|
114
|
-
</html>
|
@@ -1,210 +0,0 @@
|
|
1
|
-
#! /usr/bin/perl -w
|
2
|
-
|
3
|
-
# Spell Checker Plugin for HTMLArea-3.0
|
4
|
-
# Sponsored by www.americanbible.org
|
5
|
-
# Implementation by Mihai Bazon, http://dynarch.com/mishoo/
|
6
|
-
#
|
7
|
-
# (c) dynarch.com 2003.
|
8
|
-
# Distributed under the same terms as HTMLArea itself.
|
9
|
-
# This notice MUST stay intact for use (see license.txt).
|
10
|
-
#
|
11
|
-
# $Id: spell-check-logic.cgi,v 1.10 2004/01/31 13:47:05 mishoo Exp $
|
12
|
-
|
13
|
-
use strict;
|
14
|
-
use utf8;
|
15
|
-
use Encode;
|
16
|
-
use Text::Aspell;
|
17
|
-
use XML::DOM;
|
18
|
-
use CGI;
|
19
|
-
|
20
|
-
my $TIMER_start = undef;
|
21
|
-
eval {
|
22
|
-
use Time::HiRes qw( gettimeofday tv_interval );
|
23
|
-
$TIMER_start = [gettimeofday()];
|
24
|
-
};
|
25
|
-
# use POSIX qw( locale_h );
|
26
|
-
|
27
|
-
binmode STDIN, ':utf8';
|
28
|
-
binmode STDOUT, ':utf8';
|
29
|
-
|
30
|
-
my $debug = 0;
|
31
|
-
|
32
|
-
my $speller = new Text::Aspell;
|
33
|
-
my $cgi = new CGI;
|
34
|
-
|
35
|
-
my $total_words = 0;
|
36
|
-
my $total_mispelled = 0;
|
37
|
-
my $total_suggestions = 0;
|
38
|
-
my $total_words_suggested = 0;
|
39
|
-
|
40
|
-
# FIXME: report a nice error...
|
41
|
-
die "Can't create speller!" unless $speller;
|
42
|
-
|
43
|
-
my $dict = $cgi->param('dictionary') || $cgi->cookie('dictionary') || 'en';
|
44
|
-
|
45
|
-
# add configurable option for this
|
46
|
-
$speller->set_option('lang', $dict);
|
47
|
-
$speller->set_option('encoding', 'UTF-8');
|
48
|
-
#setlocale(LC_CTYPE, $dict);
|
49
|
-
|
50
|
-
# ultra, fast, normal, bad-spellers
|
51
|
-
# bad-spellers seems to cause segmentation fault
|
52
|
-
$speller->set_option('sug-mode', 'normal');
|
53
|
-
|
54
|
-
my %suggested_words = ();
|
55
|
-
keys %suggested_words = 128;
|
56
|
-
|
57
|
-
my $file_content = decode('UTF-8', $cgi->param('content'));
|
58
|
-
$file_content = parse_with_dom($file_content);
|
59
|
-
|
60
|
-
my $ck_dictionary = $cgi->cookie(-name => 'dictionary',
|
61
|
-
-value => $dict,
|
62
|
-
-expires => '+30d');
|
63
|
-
|
64
|
-
print $cgi->header(-type => 'text/html; charset: utf-8',
|
65
|
-
-cookie => $ck_dictionary);
|
66
|
-
|
67
|
-
my $js_suggested_words = make_js_hash(\%suggested_words);
|
68
|
-
my $js_spellcheck_info = make_js_hash_from_array
|
69
|
-
([
|
70
|
-
[ 'Total words' , $total_words ],
|
71
|
-
[ 'Mispelled words' , $total_mispelled . ' in dictionary \"'.$dict.'\"' ],
|
72
|
-
[ 'Total suggestions' , $total_suggestions ],
|
73
|
-
[ 'Total words suggested' , $total_words_suggested ],
|
74
|
-
[ 'Spell-checked in' , defined $TIMER_start ? (tv_interval($TIMER_start) . ' seconds') : 'n/a' ]
|
75
|
-
]);
|
76
|
-
|
77
|
-
print qq^<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
78
|
-
<html>
|
79
|
-
<head>
|
80
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
81
|
-
<link rel="stylesheet" type="text/css" media="all" href="spell-check-style.css" />
|
82
|
-
<script type="text/javascript">
|
83
|
-
var suggested_words = { $js_suggested_words };
|
84
|
-
var spellcheck_info = { $js_spellcheck_info }; </script>
|
85
|
-
</head>
|
86
|
-
<body onload="window.parent.finishedSpellChecking();">^;
|
87
|
-
|
88
|
-
print $file_content;
|
89
|
-
if ($cgi->param('init') eq '1') {
|
90
|
-
my @dicts = $speller->dictionary_info();
|
91
|
-
my $dictionaries = '';
|
92
|
-
foreach my $i (@dicts) {
|
93
|
-
next if $i->{jargon};
|
94
|
-
my $name = $i->{name};
|
95
|
-
if ($name eq $dict) {
|
96
|
-
$name = '@'.$name;
|
97
|
-
}
|
98
|
-
$dictionaries .= ',' . $name;
|
99
|
-
}
|
100
|
-
$dictionaries =~ s/^,//;
|
101
|
-
print qq^<div id="HA-spellcheck-dictionaries">$dictionaries</div>^;
|
102
|
-
}
|
103
|
-
|
104
|
-
print '</body></html>';
|
105
|
-
|
106
|
-
# Perl is beautiful.
|
107
|
-
sub spellcheck {
|
108
|
-
my $node = shift;
|
109
|
-
my $doc = $node->getOwnerDocument;
|
110
|
-
my $check = sub { # called for each word in the text
|
111
|
-
# input is in UTF-8
|
112
|
-
my $word = shift;
|
113
|
-
my $already_suggested = defined $suggested_words{$word};
|
114
|
-
++$total_words;
|
115
|
-
if (!$already_suggested && $speller->check($word)) {
|
116
|
-
return undef;
|
117
|
-
} else {
|
118
|
-
# we should have suggestions; give them back to browser in UTF-8
|
119
|
-
++$total_mispelled;
|
120
|
-
if (!$already_suggested) {
|
121
|
-
# compute suggestions for this word
|
122
|
-
my @suggestions = $speller->suggest($word);
|
123
|
-
my $suggestions = decode($speller->get_option('encoding'), join(',', @suggestions));
|
124
|
-
$suggested_words{$word} = $suggestions;
|
125
|
-
++$total_suggestions;
|
126
|
-
$total_words_suggested += scalar @suggestions;
|
127
|
-
}
|
128
|
-
# HA-spellcheck-error
|
129
|
-
my $err = $doc->createElement('span');
|
130
|
-
$err->setAttribute('class', 'HA-spellcheck-error');
|
131
|
-
my $tmp = $doc->createTextNode;
|
132
|
-
$tmp->setNodeValue($word);
|
133
|
-
$err->appendChild($tmp);
|
134
|
-
return $err;
|
135
|
-
}
|
136
|
-
};
|
137
|
-
while ($node->getNodeValue =~ /([\p{IsWord}']+)/) {
|
138
|
-
my $word = $1;
|
139
|
-
my $before = $`;
|
140
|
-
my $after = $';
|
141
|
-
my $df = &$check($word);
|
142
|
-
if (!$df) {
|
143
|
-
$before .= $word;
|
144
|
-
}
|
145
|
-
{
|
146
|
-
my $parent = $node->getParentNode;
|
147
|
-
my $n1 = $doc->createTextNode;
|
148
|
-
$n1->setNodeValue($before);
|
149
|
-
$parent->insertBefore($n1, $node);
|
150
|
-
$parent->insertBefore($df, $node) if $df;
|
151
|
-
$node->setNodeValue($after);
|
152
|
-
}
|
153
|
-
}
|
154
|
-
};
|
155
|
-
|
156
|
-
sub check_inner_text {
|
157
|
-
my $node = shift;
|
158
|
-
my $text = '';
|
159
|
-
for (my $i = $node->getFirstChild; defined $i; $i = $i->getNextSibling) {
|
160
|
-
if ($i->getNodeType == TEXT_NODE) {
|
161
|
-
spellcheck($i);
|
162
|
-
}
|
163
|
-
}
|
164
|
-
};
|
165
|
-
|
166
|
-
sub parse_with_dom {
|
167
|
-
my ($text) = @_;
|
168
|
-
$text = '<spellchecker>'.$text.'</spellchecker>';
|
169
|
-
|
170
|
-
my $parser = new XML::DOM::Parser;
|
171
|
-
if ($debug) {
|
172
|
-
open(FOO, '>:utf8', '/tmp/foo');
|
173
|
-
print FOO $text;
|
174
|
-
close FOO;
|
175
|
-
}
|
176
|
-
my $doc = $parser->parse($text);
|
177
|
-
my $nodes = $doc->getElementsByTagName('*');
|
178
|
-
my $n = $nodes->getLength;
|
179
|
-
|
180
|
-
for (my $i = 0; $i < $n; ++$i) {
|
181
|
-
my $node = $nodes->item($i);
|
182
|
-
if ($node->getNodeType == ELEMENT_NODE) {
|
183
|
-
check_inner_text($node);
|
184
|
-
}
|
185
|
-
}
|
186
|
-
|
187
|
-
my $ret = $doc->toString;
|
188
|
-
$ret =~ s{<spellchecker>(.*)</spellchecker>}{$1}sg;
|
189
|
-
return $ret;
|
190
|
-
};
|
191
|
-
|
192
|
-
sub make_js_hash {
|
193
|
-
my ($hash) = @_;
|
194
|
-
my $js_hash = '';
|
195
|
-
while (my ($key, $val) = each %$hash) {
|
196
|
-
$js_hash .= ',' if $js_hash;
|
197
|
-
$js_hash .= '"'.$key.'":"'.$val.'"';
|
198
|
-
}
|
199
|
-
return $js_hash;
|
200
|
-
};
|
201
|
-
|
202
|
-
sub make_js_hash_from_array {
|
203
|
-
my ($array) = @_;
|
204
|
-
my $js_hash = '';
|
205
|
-
foreach my $i (@$array) {
|
206
|
-
$js_hash .= ',' if $js_hash;
|
207
|
-
$js_hash .= '"'.$i->[0].'":"'.$i->[1].'"';
|
208
|
-
}
|
209
|
-
return $js_hash;
|
210
|
-
};
|
@@ -1,10 +0,0 @@
|
|
1
|
-
.HA-spellcheck-error { border-bottom: 1px dashed #f00; cursor: default; }
|
2
|
-
.HA-spellcheck-same { background-color: #cef; color: #000; }
|
3
|
-
.HA-spellcheck-hover { background-color: #433; color: white; }
|
4
|
-
.HA-spellcheck-fixed { border-bottom: 1px dashed #0b8; }
|
5
|
-
.HA-spellcheck-current { background-color: #9be; color: #000; }
|
6
|
-
.HA-spellcheck-suggestions { display: none; }
|
7
|
-
|
8
|
-
#HA-spellcheck-dictionaries { display: none; }
|
9
|
-
|
10
|
-
a:link, a:visited { color: #55e; }
|
@@ -1,122 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
|
3
|
-
Strangely, IE sucks with or without the DOCTYPE switch.
|
4
|
-
I thought it would only suck without it.
|
5
|
-
|
6
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
7
|
-
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
8
|
-
|
9
|
-
Spell Checker Plugin for HTMLArea-3.0
|
10
|
-
Sponsored by www.americanbible.org
|
11
|
-
Implementation by Mihai Bazon, http://dynarch.com/mishoo/
|
12
|
-
|
13
|
-
(c) dynarch.com 2003.
|
14
|
-
Distributed under the same terms as HTMLArea itself.
|
15
|
-
This notice MUST stay intact for use (see license.txt).
|
16
|
-
|
17
|
-
$Id: spell-check-ui.html,v 1.5 2004/01/31 13:47:05 mishoo Exp $
|
18
|
-
|
19
|
-
-->
|
20
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
21
|
-
|
22
|
-
<head>
|
23
|
-
<title>Spell Checker</title>
|
24
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
25
|
-
<script type="text/javascript" src="spell-check-ui.js"></script>
|
26
|
-
|
27
|
-
<style type="text/css">
|
28
|
-
html, body { height: 100%; margin: 0px; padding: 0px; background-color: #fff;
|
29
|
-
color: #000; }
|
30
|
-
a:link, a:visited { color: #00f; text-decoration: none; }
|
31
|
-
a:hover { color: #f00; text-decoration: underline; }
|
32
|
-
|
33
|
-
table { background-color: ButtonFace; color: ButtonText;
|
34
|
-
font-family: tahoma,verdana,sans-serif; font-size: 11px; }
|
35
|
-
|
36
|
-
iframe { background-color: #fff; color: #000; height: 100%; width: 100%; }
|
37
|
-
|
38
|
-
.controls { width: 13em; }
|
39
|
-
.controls .sectitle { /* background-color: #736c6c; color: #fff;
|
40
|
-
border-top: 1px solid #000; border-bottom: 1px solid #fff; */
|
41
|
-
text-align: center;
|
42
|
-
font-weight: bold; padding: 2px 4px; }
|
43
|
-
.controls .secbody { margin-bottom: 10px; }
|
44
|
-
|
45
|
-
button, select { font-family: tahoma,verdana,sans-serif; font-size: 11px; }
|
46
|
-
button { width: 6em; padding: 0px; }
|
47
|
-
|
48
|
-
input, select { font-family: fixed,"andale mono",monospace; }
|
49
|
-
|
50
|
-
#v_currentWord { color: #f00; font-weight: bold; }
|
51
|
-
#statusbar { padding: 7px 0px 0px 5px; }
|
52
|
-
#status { font-weight: bold; }
|
53
|
-
</style>
|
54
|
-
|
55
|
-
</head>
|
56
|
-
|
57
|
-
<body onload="initDocument()">
|
58
|
-
|
59
|
-
<form style="display: none;" action="spell-check-logic.cgi"
|
60
|
-
method="post" target="framecontent"
|
61
|
-
accept-charset="UTF-8"
|
62
|
-
><input type="hidden" name="content" id="f_content"
|
63
|
-
/><input type="hidden" name="dictionary" id="f_dictionary"
|
64
|
-
/><input type="hidden" name="init" id="f_init" value="1"
|
65
|
-
/></form>
|
66
|
-
|
67
|
-
<table style="height: 100%; width: 100%; border-collapse: collapse;" cellspacing="0" cellpadding="0">
|
68
|
-
<tr>
|
69
|
-
<td colspan="2" style="height: 1em; padding: 2px;">
|
70
|
-
<div style="float: right; padding: 2px;"><span>Dictionary</span>
|
71
|
-
<select id="v_dictionaries" style="width: 10em"></select>
|
72
|
-
<button id="b_recheck">Re-check</button>
|
73
|
-
</div>
|
74
|
-
<span id="status">Please wait. Calling spell checker.</span>
|
75
|
-
</td>
|
76
|
-
</tr>
|
77
|
-
<tr>
|
78
|
-
<td valign="top" class="controls">
|
79
|
-
<div class="secbody" style="text-align: center">
|
80
|
-
<button id="b_info">Info</button>
|
81
|
-
</div>
|
82
|
-
<div class="sectitle">Original word</div>
|
83
|
-
<div class="secbody" id="v_currentWord" style="text-align:
|
84
|
-
center; margin-bottom: 0px;">pliz weit ;-)</div>
|
85
|
-
<div class="secbody" style="text-align: center">
|
86
|
-
<button id="b_revert">Revert</button>
|
87
|
-
</div>
|
88
|
-
<div class="sectitle">Replace with</div>
|
89
|
-
<div class="secbody">
|
90
|
-
<input type="text" id="v_replacement" style="width: 94%; margin-left: 3%;" /><br />
|
91
|
-
<div style="text-align: center; margin-top: 2px;">
|
92
|
-
<button id="b_replace">Replace</button><button
|
93
|
-
id="b_replall">Replace all</button><br /><button
|
94
|
-
id="b_ignore">Ignore</button><button
|
95
|
-
id="b_ignall">Ignore all</button>
|
96
|
-
</div>
|
97
|
-
</div>
|
98
|
-
<div class="sectitle">Suggestions</div>
|
99
|
-
<div class="secbody">
|
100
|
-
<select size="11" style="width: 94%; margin-left: 3%;" id="v_suggestions"></select>
|
101
|
-
</div>
|
102
|
-
</td>
|
103
|
-
|
104
|
-
<td>
|
105
|
-
<iframe src="about:blank" width="100%" height="100%"
|
106
|
-
id="i_framecontent" name="framecontent"></iframe>
|
107
|
-
</td>
|
108
|
-
</tr>
|
109
|
-
<tr>
|
110
|
-
<td style="height: 1em;" colspan="2">
|
111
|
-
<div style="padding: 4px 2px 2px 2px; float: right;">
|
112
|
-
<button id="b_ok">OK</button>
|
113
|
-
<button id="b_cancel">Cancel</button>
|
114
|
-
</div>
|
115
|
-
<div id="statusbar"></div>
|
116
|
-
</td>
|
117
|
-
</tr>
|
118
|
-
</table>
|
119
|
-
|
120
|
-
</body>
|
121
|
-
|
122
|
-
</html>
|