I don't see what you mean by "changes my encoded ampersand in the href attribute to an unencoded one"
Both your before & after code lines look identical w/ an unencoded &
<a href="
http://www.test.com/index.htm?one=1&two=2">test</a>
If I enter
<a href="
http://www.test.com/index.htm?one=1&two=2">test</a>
It does reformat it to
<a href="
http://www.test.com/index.htm?one=1&two=2">test</a>
No you are not missing anything in the S&R (you are limited to the options in the drop down)
| 1)
| Before applying XML formatting rules (code view):
| <code>
| <!-- before -->
| <a href="
http://www.test.com/index.htm?one=1&two=2">test</a>
| can't
| <!-- end before -->
| </code>
|
| After applying XML formatting rules (code view):
| <code>
| <!-- after -->
| <a href="
http://www.test.com/index.htm?one=1&two=2">test</a>
| can't
| <!-- end after -->
| </code>
|
| I'm happy that the apostrophe changes to <code>'</code> in the word "can't,"
| but I not happy about how applying xml formatting rules changes my encoded
| ampersand in the href attribute to an unencoded one.
|
| 2) I've struggled with the HTML Rules in the S & R function, but I just
| can't seem to get it to work. It seems I can replace the contents of an
| element, and I can change the element itself, and I can change an element's
| attribute, but I can't change the content of an element's attribute. Or am I
| missing something?
|
| Does anyone have a clever macro that uses regexp to accomplish something
| akin to what I'm after? The thread at
|
http://dbforums.com/showthread.php?threadid=429652 indicates a similar need,
| just not in a FrontPage environment.
|
|
| "Stefan B Rusynko" wrote:
|
| > 1) Provide a snippet of a & link before / after the change
| > 2) You can use FP 2003 S & R the Html Tags tab - Html Rules for the type of replace you want
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| >
http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | Hello all,
| > |
| > | My co-workers and I use FrontPage 2003 to make pages that validate as XHTML
| > | 1.0 Transitional. We use Design View mostly, then right before publishing go
| > | to Code view and Apply XML Formatting Rules. This works wonderfully, except
| > | it unencodes ampersands in all our URLs (it changes every instance of "&" to
| > | "&" if it exists in an "<a> </a>" element). Is there a way to stop this from
| > | happening? If not, is there something fancy we can do with FP2003's
| > | search-and-replace function so as to globally replace only those instances of
| > | "&" with "&" that exist within "<a> </a>" elements?
| > |
| > | Thanks in advance for any help.
| > |
| > |
| >
| >
| >