Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Change dreamweavers default double quotes to single quotes

Posted on 2006-06-27
5
Medium Priority
?
218 Views
Last Modified: 2010-04-25
Hi,
By default dreamweaver outputs tags like this:

<img src="foo.gif" class="blah">

As you can see from the above the values are always enclosed in double quotes by default, how can i change the default to be single quotes?

eg:
<img src='foo.gif' class='blah'>

I am tired of everytime copying it into notepad and then running a replace all before inserting it into the db.

Or if I am barking up the wrong tree and this is not possible (changing DWs default behavior, just tell me and I'll give you the points anyway)

Thanks!
0
Comment
Question by:scarab890
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 160 total points
ID: 16998398
Hi scarab890,

I don't think there is an easy way to this.  You should look in this directory:

C:\Program Files\Macromedia\Dreamweaver 8\Configuration

for the file Configuration_ReadMe.htm which explains the layout of that directory.  There may be something easily editable.

However, I think this functionality is hard-coded and there isn't a good way to change it.  You can try working with the DW API to create an extension, but that would be the extent of it.
0
 
LVL 25

Expert Comment

by:Rouchie
ID: 16999091
Isn't it correct to use double-quotes in standard-compliant HTML?  I've always used this.  

Single quotes as far as I know are for javascript.
0
 

Author Comment

by:scarab890
ID: 16999800
Hi,
Thanks for replying.

I did check C:\Programs\Macromedia\Dreamweaver MX 2004\Configuration but didnt find my answer there

I have no idea of how to create an extentsion and since i am in the middle of a project, I really dont have time to take time off and learn :-(

Any other ideas?

@Rouchie, Not really bothered about being standard-compliant as long as it works and renders properly in IE and FF :-)

The reason I need single quotes is I am creating the content of the page in DW then just copying the whole table to the DB...but its screwing up my insert and fetch queries when there are double quotes.
I am trying to avoid using addslashes or str_replace, but does not look like i have a lot of choice.

Thanks!
0
 
LVL 25

Accepted Solution

by:
Rouchie earned 180 total points
ID: 17000914
Okay you're suffering a very common problem here.  The truth is that both single quotes & double quotes will mess up your database data because both those symbols are found in select statements.

Here's the recommended solution (IMO):
   - Use double quotes in your html.  Being standard-compliant is the only way it will render correctly in Firefox
   - Before you save the data to the database, double up your double-quotes(!).  Databases treat a single occurrence of a double-quote as a delimeter, but ignore doubled up entries.

So basically:
   <img src="foo.gif" class="blah">

would be saved as this:
   <img src=""foo.gif"" class=""blah"">

Try it and see what result you get - but backup your code first just in case :-)
0
 

Author Comment

by:scarab890
ID: 17001018
Its ok, thanks for your help guys, I am leaving DW alone and tackling this from the php side via mysql_real_escape_string()

I split the points as both of you tried to help me.

Thanks again!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question