my @para_text = (
"The build of $build CUT$cut was started as requested and
its progress can be monitored in Anthill here",
"",
"http://anthill:8080/tasks/project/BuildLifeTasks/viewBuildLife?
buildLifeId=$lifeid",
"",
'If it completes successfully (Overall Anthill status will show as green
Complete and all sub steps as green Success) the built output will be
available for deployment and testing by first copying the zip file from here
\\\mizar\release\AnthillRelease\$build',
"", "If the output exists but the anthill build was not completely
successful DO NOT attempt to copy and deploy the output. \n",
"We will send the usual email detailing content etc. when the build
finishes. \n");
$para_text[0] =~ s/[\r\n]//gm; # convert multiline to single line
@para_text = join "\n", @para_text;
s/([\\"])/\\$1/g, s/\n/\\n/g for @para_text;
$mech->eval_in_page( qq/document.getElementsByName("txtbdy")[0].value = "@para_text", "test"/ );
我有上面的代码。
该数组包含一个电子邮件模板,脚本是围绕 Outlook webapp 使用WWW::Mechanize::Firefox
.
电子邮件模板中有一个带有反斜杠的目录。
MozRepl
将文本放入该行的文本框中时,不允许使用反斜杠或任何特殊字符$mech->eval_in_page
。
如果模块不允许,如何在文本中添加反斜杠?