sfc-utils 1.4.103 → 1.4.105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,6 +31,10 @@ const LayoutHelmet = ({
31
31
  },
32
32
  } = meta;
33
33
 
34
+ // Update to handle escaping double quotes
35
+ const schemaTitle = TITLE ? TITLE.replace(/"/g, '\\"') : "";
36
+ const schemaDescription = DESCRIPTION ? DESCRIPTION.replace(/"/g, '\\"') : "";
37
+
34
38
  // Handle style sheet on brands2 vs brands3
35
39
  const isApp = appCheck();
36
40
  let styleSheetID;
@@ -112,7 +116,7 @@ const LayoutHelmet = ({
112
116
  favHref =
113
117
  "https://www.timesunion.com/sites/timesunion/apple-touch-icon-152x152.png";
114
118
  } else if (MARKET_KEY === "CT") {
115
- // TODO: Fill this in when the sites get swapped
119
+ favHref = "https://www.ctinsider.com/sites/premiumctpost/favicon-32x32.png";
116
120
  } else if (MARKET_KEY === "Texcom") {
117
121
  // TODO: Fill this in when the sites get swapped
118
122
  } else if (MARKET_KEY === "Midcom") {
@@ -133,7 +137,7 @@ const LayoutHelmet = ({
133
137
  "@type": "WebPage",
134
138
  "@id": "${MAIN_DOMAIN}/${SUBFOLDER}${OPT_SLASH}${SLUG}/${url_add}"
135
139
  },
136
- "headline": "${TITLE}",
140
+ "headline": "${schemaTitle}",
137
141
  "image": {
138
142
  "@type": "ImageObject",
139
143
  "url": "${IMAGE}"
@@ -152,7 +156,7 @@ const LayoutHelmet = ({
152
156
  }
153
157
  },
154
158
  "articleSection": "${articleSection}",
155
- "description": "${DESCRIPTION}"
159
+ "description": "${schemaDescription}"
156
160
  }`;
157
161
 
158
162
  // Format the date for WCM, cut off at the period
package/index.js CHANGED
@@ -98,7 +98,7 @@ let blendHDN = function (meta) {
98
98
  HDN.dataLayer.paywall = {};
99
99
 
100
100
  // HDN.dataLayer object for content and href data
101
- HDN.dataLayer.content.title = TITLE;
101
+ HDN.dataLayer.content.title = meta.DISPLAY_TITLE || TITLE;
102
102
  HDN.dataLayer.content.subtitle = "";
103
103
  HDN.dataLayer.content.objectId = `${SUBFOLDER}${slash}${SLUG}/${URL_ADD}`;
104
104
  HDN.dataLayer.content.objectType = "project";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfc-utils",
3
- "version": "1.4.103",
3
+ "version": "1.4.105",
4
4
  "author": "ewagstaff <evanjwagstaff@gmail.com>",
5
5
  "dependencies": {
6
6
  "archieml": "^0.4.2",