Skip to content

Commit e4ebd59

Browse files
matthewrfindleyThomasBurleson
authored andcommitted
fix(demo,codepen): use escaped html and special for demos
Codepen is expecting escaped html, it is far too difficult to walk the dom and replace only certain dashes. escape ampersands in escaped quotes - 5/12/2015 release of codepen API introduced an undocumented breaking change replace accent char - changes to codepen api causes this demo to break. Replacing with quote instead of accent. replace special character- undocumented changes to codepen cause this demo to break when editing in codepen. Closes angular#2833.
1 parent 39459fe commit e4ebd59

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

docs/app/js/codepen.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
// See http://blog.codepen.io/documentation/api/prefill
4040
function escapeJsonQuotes(json) {
4141
return JSON.stringify(json)
42-
.replace(/"/g, """)
43-
.replace(/"/g, "'");
42+
.replace(/'/g, "'")
43+
.replace(/"/g, """);
4444
}
4545
}
4646

@@ -141,6 +141,7 @@
141141
// uses the correct escaped characters
142142
function htmlEscapeAmpersand(html) {
143143
return html
144+
.replace(/—/g, "—")
144145
.replace(/>/g, ">")
145146
.replace(/ /g, " ")
146147
.replace(/</g, "<");

src/components/chips/demoContactChips/script.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
'Anita Gros',
4343
'Megan Smith',
4444
'Tsvetko Metzger',
45-
'Hector Šimek',
45+
'Hector Simek',
4646
'Some-guy withalongalastaname'
4747
];
4848

src/components/dialog/demoBasicUsage/dialog1.tmpl.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<img style="margin: auto; max-width: 100%;" alt="Lush mango tree" src="https://material.angularjs.org/img/mangues.jpg">
1111

1212
<p>
13-
The highest concentration of Mangifera genus is in the western part of Malesia (Sumatra, Java and Borneo) and in Burma and India. While other Mangifera species (e.g. horse mango, M. foetida) are also grown on a more localized basis, Mangifera indicathe "common mango" or "Indian mango"is the only mango tree commonly cultivated in many tropical and subtropical regions.
13+
The highest concentration of Mangifera genus is in the western part of Malesia (Sumatra, Java and Borneo) and in Burma and India. While other Mangifera species (e.g. horse mango, M. foetida) are also grown on a more localized basis, Mangifera indica&mdash;the "common mango" or "Indian mango"&mdash;is the only mango tree commonly cultivated in many tropical and subtropical regions.
1414
</p>
1515
<p>
1616
It originated in Indian subcontinent (present day India and Pakistan) and Burma. It is the national fruit of India, Pakistan, and the Philippines, and the national tree of Bangladesh. In several cultures, its fruit and leaves are ritually used as floral decorations at weddings, public celebrations, and religious ceremonies.

src/components/progressCircular/demoBasicUsage/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ <h4 style="margin-top:10px">Determinate</h4>
77
</div>
88

99
<h4>Indeterminate</h4>
10-
<p>For operations where the user is asked to wait a moment while something finishes up, and its not necessary to expose what's happening behind the scenes and how long it will take, use an indeterminate indicator.</p>
10+
<p>For operations where the user is asked to wait a moment while something finishes up, and it's not necessary to expose what's happening behind the scenes and how long it will take, use an indeterminate indicator.</p>
1111
<div layout="row" layout-sm="column" layout-align="space-around">
1212
<md-progress-circular md-mode="indeterminate"></md-progress-circular>
1313
</div>

0 commit comments

Comments
 (0)