diff --git a/wp-content/themes/tcs-responsive/ng-page-challenge-details.php b/wp-content/themes/tcs-responsive/ng-page-challenge-details.php
index fea1d94a..d114298e 100644
--- a/wp-content/themes/tcs-responsive/ng-page-challenge-details.php
+++ b/wp-content/themes/tcs-responsive/ng-page-challenge-details.php
@@ -7,6 +7,9 @@
* @file
* This template displays the details of a particular challenge.
*/
+
+//remove canonical link for challenge details pages because it does not point to challenge url and causes error for facebook share scraper
+remove_action('wp_head', 'rel_canonical');
tc_setup_angular();
@@ -30,7 +33,36 @@ function tc_challenge_details_js() {
registrationEndDate)) {
+ $contest = get_contest_detail('', $contestID, $contestType);
+}
+$postingDate = strtotime($contest->postingDate) | 1;
+$postingDate = date('M d, Y', $postingDate);
+$summary = $contest->detailedRequirements;
+//strip out new lines and whitespace from API data
+$summary = str_replace("\n", " ", $summary);
+$summary = str_replace("\t", " ", $summary);
+//strip out HTML tags
+$summary = strip_tags($summary);
+//max length for description = 300 characters
+$summary = substr( $summary, 0, strrpos( substr( $summary, 0, 297), ' ' ) ) . '...';
+$summary = str_replace(" ", ' ', $summary);
+$summary = str_replace("'", "'", $summary);
+$summary = str_replace(""", "'", $summary);
+//output facebook og properties
+?>
+challengeId . "/?type=" . $contest->challengeCommunity; ?>"/>
+
+
+
+
registrationEndDate)) {
+ $contest = get_contest_detail('', $contestID, $contestType);
+}
+$postingDate = strtotime($contest->postingDate) | 1;
+$postingDate = date('M d, Y', $postingDate);
+$summary = $contest->detailedRequirements;
+//strip out new lines and whitespace from API data
+$summary = str_replace("\n", " ", $summary);
+$summary = str_replace("\t", " ", $summary);
+//strip out HTML tags
+$summary = strip_tags($summary);
+//max length for description = 300 characters
+$summary = substr( $summary, 0, strrpos( substr( $summary, 0, 297), ' ' ) ) . '...';
+$summary = str_replace(" ", ' ', $summary);
+$summary = str_replace("'", "'", $summary);
+$summary = str_replace(""", "'", $summary);
+//output facebook og properties
+?>
+challengeId . "/?type=" . $contest->challengeCommunity; ?>"/>
+
+
+
+