|
I seem to remember seeing the same problem everywhere. No matter what combination of options I select, it still doesn't escape the copied code. I mostly remember it happening when responding to a message or Q/A.
I think CP's editor component is trying to be too smart for its own good, and I've been unhappy with it since about January.
Here's some XAML pasted in, highlighted, and then set as a "code block". It's obviously missing the left pointy brackets:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- colors -->
<SolidColorBrush x:Key="FMBrushChartPanelBorder" Color="DarkBlue" />
<SolidColorBrush x:Key="FMBrushChartPanelBackground" Color="Silver" />
<SolidColorBrush x:Key="FMBrushChartPageBackground" Color="White" />
<SolidColorBrush x:Key="FMBrushChartTitle" Color="Black" />
<SolidColorBrush x:Key="FMBrushChartSubitle" Color="Black" />
</ResourceDictionary>
This happens to me *all the time*, in Firefox, Opera, and IE. The only time I get all the pointy brackets is if I turn OFF "Use HTML in this post".
.45 ACP - because shooting twice is just silly----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
modified on Sunday, May 16, 2010 8:09 AM
|
|
|
|
|
AFAIK the QA and TT editor use a multi-step process when you paste something in; I'm guessing this is the order they execute:
- check for a URL, if so does a dual-hyperlink conversion (with a CP article title lookup);
- if not, call on a code sniffer, which tries and determines whether it is text or code (based on my article).
- if text, a simple paste should happen
- if code, PRE tags get added, lefthand space gets reduced, HTML encoding occurs (< > &)
- and probably always: a lot of tags get removed to avoid browser screw up; some blacklisted words get removed; smileys get inserted.
I expect CP doesn't want an unescaped HEAD tag, so it should either be escaped or removed. If it got (partially) removed, I would say there is a bug,e.g. the above steps got executed in the wrong order.
I noticed the radio button texts have changed; I don't understand what they mean now (I don't do QA anymore).
BTW: you mention "Use HTML in this post", however that exists in the forum message editor, not the QA/TT editor.
PS: IMO all these actions should be browser-independent, as they define message content (which is neutral), not message rendering (which may be reader browser dependent).
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Luc Pattyn wrote: (I don't do QA anymore)
Why not?
I think the message forum editor needs a checkbox that reads "Escape pasted text".
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
IMO it only suits the simplest of situations: simple question, simple answer, done. Maybe a second answer, maybe a comment. If that were all CP was offering, I wouldn't be here.
The lack of message hierarchy (as in forums), the spacious but counterproductive layout, and numerous bugs, all hamper any serious discussion. And the content again being vulnerable to falsification, makes me avoiding the place a no-brainer.
If you want more, see my sig.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Here's what I get when I paste that block (with <'s added back in):
<xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- colors -->
<"FMBrushChartPanelBorder" Color="DarkBlue" />
<"FMBrushChartPanelBackground" Color="Silver" />
<"FMBrushChartPageBackground" Color="White" />
<"FMBrushChartTitle" Color="Black" />
<"FMBrushChartSubitle" Color="Black" />
I have:
- Use HTML in this post CHECKED (meaning: let me use <b> and <i> etc
- Encode "<" (and other HTML) characters when pasting CHECKED (meaning: when I paste code, the pointy angle bracket "<"s will get converted to >'s so they show up correctly
This works in IE, Firefox and Chrome/Safari.
I have javascript enabled.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Thought you might find this one[^] interesting (or not if you don't want a Ford).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Don't know what was in his head posting that as an aticle! Such users should be nicely kicked and warned
|
|
|
|
|
Check out this thread. Notice how the title of the message that starts the thread does not match the title of the replies. My guess is the <br /> got removed because it's HTML. That's inconsistent. By the way, I realize the titles can be edited in replies, but I doubt that was the case here, as I don't see any very good reason the person who replied would make such a change.
|
|
|
|
|
Well spotted. Added to bug list.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Try entering a QA comment with C++ in it. The plusses are replaced with spaces, which makes a small difference to the advice given!
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in.
Apathy Error: Don't bother striking any key.
|
|
|
|
|
Thanks - Matthew's on it.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
This should be fixed in the next update.
You members keep finding the edge case I missed in my tests. Keep it up!, and thanks.
Matthew
|
|
|
|
|
I just realized that I keep coming back to some articles (example: CFileInfoArray: A class for gathering file information recursively through directories[^]) over and over again. In fact, there are many articles here on CP like this one: practical, good implementation, and (above all) useful no matter how old it is. Articles like this have saved me countless hours; drop them into any project and they simply work.
I suggest that these kinds of articles need a special award. I know we have monthly awards, etc., but what I'm talking about are articles that stand the test of time, and are not merely popular because they use Microsoft's latest framework or UI widget du jour.
Obviously, the fundamental requirement to be on such a "Desert Island" list would be article longevity; a minimum of three years seems right to me.
I also suggest that the Desert Island List should have continuous "open voting"; any member can vote for any article (that meets the age requirement) to be included on the DIL, any time the member wants to vote. The CP editors can use the voting results to periodically update the DIL (of course, the CP editors will use their own judgment too). The vote itself is non-numeric; it simply says "Hey, include this one."
The DIL should have its own page on CP with a list of the articles, optionally sorted by (1) date added; and (2) article category (C++, .NET, etc.).
Comments?
|
|
|
|
|
I love the idea, but wouldn't the list essentially just be this list[^] with a cutoff on date and rating/votes?
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Chris, you know that the article voting here on CP is mostly based on popularity of current authors and technologies, regardless of how useful the article is. Unfortunately, when people abandon these once-popular technologies and move on, they never go back and re-vote, based on how useful the article actually proves to be.
What I propose is a usefulness list, heavily moderated by CP editors, to eliminate any fad tendencies.
|
|
|
|
|
If you read blogs of programmers, you will see that a lot of them have lists like "My Top Ten ...". These lists are simply the things that the author has found useful. Imagine if every CP member had such a blog; the DIL is simply a concatenation of those lists.
|
|
|
|
|
We allow members to mark their bookmarked articles as "publicly recommended". How about using that?
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Unless I've missed something, "bookmarked articles" like "watched items" are both brain-dead; you don't get notices of article updates for either one. So I would say that using a useless feature as a means of voting on useful articles is a non-starter.
I think the emphasis should be on usefulness. Anything that is tied to ratings or popularity should be avoided. In fact, you could make a fresh start with the DIL by having a button that says, See who voted for this article. Clicking the button would show a list in chrono order of people who voted; first in list = first person to vote for the article. CP editors should be allowed to vote.
I look forward to seeing Bob in a straw hat sipping a marguerita.
|
|
|
|
|
The entire point of the "Recommend" system, which I fully admit is under-explained and under-utilised, is to allow members to highlight the articles they feel are useful. This list of recommended articles then appears in your profile. You're asking for a system to allow members to put a gold stamp on an article and say "I find this useful" and that is precisely what the recommendation system does.
As to alerts: yes, they are coming, as are your download counts. For now, Bob is not sitting back sipping a cool drink in a hat. He's in bed with a box of kleenex doped up to the eyeballs on cold and flu medicine.
And he's grumpy.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Equal parts hot water and rum, add teaspoon of ginger.
|
|
|
|
|
...but if the cold continues there is a danger it could become "equal parts of rum and ginger, add teaspoon of water"
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Maybe we should punt this to the Insiders? Using bookmarked articles might be a good idea, just not one I would have thought to use because I don't use that site feature.
Get well.
|
|
|
|
|
How about everybody is allocated only ten articles to their personal top ten list. Then the article list would be the total count of how many times the article appears in a personal top ten list. The beauty of that is, as really old articles of technology that is fading in use, are removed from people's top ten list, they will drop in rank as well. Then newer technology articles will have a 'big wall' to climb to make it to the top of this list quickly.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
I like that. The readers are much more involved, they could feel responsible for their top-10, much more so than freely voting a small or large number of articles. We might need some help, some stimulus to consider updating the top-10 any time we read an article.
Some practical questions: open for everyone? all with the same weight? or depending on rep (which rep? not just author I hope).
I foresee a bit of a problem to get it started though; just coming up with 10 right away ain't simple.
And I would like to have a textbox notepad next to each of the articles in my top 10, so I can keep private notes about them (why I liked each, what I liked about it, comparison to other articles, that kind of stuff).
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
MysticalPowers
ICantGoogle
MessageFromSpace
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|