I need to transfer a form text field to a %user_input% value. However, I am receiving error "% % are invalid characters."
At this stage, I am manually typing in predetermined "users.html" into the code:
<br><br><My:File name="manuallytyped.html">without using the %% variables.
I need a method so that the user is allowed to type in their own page names
"users_input" field - ex: "Link1.html" can replace
<My:File name="<b>%user_input%</b>">
Note: Changes made to no avail:
foreach (split(m!</Genesis:File>!si, $template)) {
next unless (m!<Genesis:File name=\"(.*?)\">(.*)!si);
my ($file) = ($1);
# print "\t" x 3, '<li>';
if (-e $file) {
# print qq!<a href="$STATE{'web_path'}$file">$file</a>
+- $str[152]!;
}
elsif ($file =~ m!\%!) {
# print "$file - $str[151]";
}
else {
print $file;
}
# print "</li>\n";
}
print "\t\t</ul>\n";
last Err;
}
return $err;
}
This does not work:
foreach (split(m!</Genesis:File>!si, $text)) {
next unless (m!<Genesis:File name=\"(.*?)\">(.*)!si);
my ($file, $text) = ($1, $2);
# strip leading and trailing vertical whitespace
$text =~ s!^(\015|\012)*!!s;
$text =~ s!(\015|\012)*$!!s;
my $is_cgi = 0;
($temp_err_msg, $is_cgi) = &CheckName( $file,1 );
if ($temp_err_msg) {
push(@temp_errors, $temp_err_msg);
next;
}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.