|
|
|
@ -32,7 +32,7 @@
|
|
|
|
|
* @source: http://www.webodf.org/
|
|
|
|
|
* @source: http://gitorious.org/webodf/webodf/
|
|
|
|
|
*/
|
|
|
|
|
/*global define,runtime,gui,ops,document */
|
|
|
|
|
/*global define, runtime, core, gui, ops, document */
|
|
|
|
|
define("webodf/editor/EditorSession", [
|
|
|
|
|
"dojo/text!resources/fonts/fonts.css"
|
|
|
|
|
], function (fontsCSS) { // fontsCSS is retrieved as a string, using dojo's text retrieval AMD plugin
|
|
|
|
@ -136,10 +136,11 @@ define("webodf/editor/EditorSession", [
|
|
|
|
|
*/
|
|
|
|
|
function createNCName(name) {
|
|
|
|
|
var letter,
|
|
|
|
|
result = "";
|
|
|
|
|
result = "",
|
|
|
|
|
i;
|
|
|
|
|
|
|
|
|
|
// encode
|
|
|
|
|
for (var i = 0; i < name.length; i++) {
|
|
|
|
|
for (i = 0; i < name.length; i++) {
|
|
|
|
|
letter = name[i];
|
|
|
|
|
// simple approach, can be improved to not skip other allowed chars
|
|
|
|
|
if (letter.match(/[a-zA-Z0-9.-_]/) !== null) {
|
|
|
|
|