Closed tomsouthall-zz closed 9 years ago
I think we might have a character encoding issue somewhere on the backend.
The close button in the PacWave offer is a multiplication sign U+00D7 × - look for \xd7 in the cURL below.
×
\xd7
I see this being saved in the correct format but then when I retrieve the offer from the API, × has been replaced by ?.
?
For now I am going to use a standard letter x which will look a bit weird. This needs fixing! The default templates all use × for close as well.
x
curl 'https://dashboard.promotably.com/api/v1/offers/2e215701-fa4d-473a-bfb1-b7e7b4b3c10f' -X PUT -H 'Pragma: no-cache' -H 'Origin: https://dashboard.promotably.com' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: en-US,en;q=0.8,fr;q=0.6' -H 'Authorization: Basic cGFkbWluOnByMG0wdGFibHk=' -H 'Content-Type: application/json' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Cache-Control: no-cache' -H 'X-Requested-With: XMLHttpRequest' -H 'Cookie: promotably=3317465d-d8c0-4841-8955-18f39324a74f; optimizelyEndUserId=oeu1427764475127r0.7121885609813035; optimizelySegments=%7B%221604121856%22%3A%22gc%22%2C%221612642543%22%3A%22direct%22%2C%221618191873%22%3A%22false%22%7D; optimizelyBuckets=%7B%7D; fbm_1523186741303436=base_domain=.promotably.com; promotably-session=278b3012-8d44-49f8-812d-5c12856bc668; promotably-user=%7B%22user-id%22%3A%226c1fa130-1c16-4f31-b092-15153bec2eb9%22%7D; __apiauth=xY4q7s7lmNk4oB4SwHE64eS637QuaKWJdZ3NLUA5X1FoGKNICpbzt6lEXZ15SRcmB3gMR2r0WUlnPoL1F1yPTA%3D%3D; _ga=GA1.2.384970763.1426907820; _gat=1' -H 'Connection: keep-alive' -H 'Referer: https://dashboard.promotably.com/offers/2e215701-fa4d-473a-bfb1-b7e7b4b3c10f/presentation' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36' --data-binary $'{"offer-id":"2e215701-fa4d-473a-bfb1-b7e7b4b3c10f","conditions":[],"reward":{"type":"dynamic-promo","promo-id":"d0c99424-790e-4cbb-a1f8-a7db9f1ee0bc","expiry-in-minutes":15},"presentation":{"type":"fixed-div","page":"any","display-text":"Get $15 off orders of $90+ if you make your purchase in the next 15 minutes","html":"<div class=\\"promotably-theme\\">\\r\\n <div class=\\"offer-content\\">\\r\\n <p class=\\"offer-line1\\">\\r\\n <span class=\\"color-call-out\\">Get <span class=\\"size-call-out\\"><span class=\\"promotably-reward\\"><span class=\\"promotably-currency\\">$</span><span class=\\"promotably-reward-amount\\">15</span></span> off</span></span>\\r\\n orders of $90+\\r\\n </p>\\r\\n <p class=\\"offer-line2\\">if you make your purchase in the next:</p>\\r\\n <div class=\\"promotably-countdown\\"></div>\\r\\n <hr>\\r\\n <p class=\\"offer-line3\\">Use code <span class=\\"promotably-promo-code\\"></span> at checkout</p>\\r\\n </div>\\r\\n <a class=\\"promotably-close\\">\xd7</a>\\r\\n</div>","css":".promotably-theme {\\r\\n position: relative;\\r\\n width: 445px;\\r\\n background: url(//s3.amazonaws.com/promotably-public/sites/pacwave/multi-products.jpg) no-repeat 15px 15px #fff;\\r\\n border: solid 10px #00aeef;\\r\\n text-align: center;\\r\\n font-family: Arial, sans-serif;\\r\\n font-size: 18px;\\r\\n color: #3c3c3c;\\r\\n padding: 20px 25px 20px 310px;\\r\\n -webkit-border-bottom-right-radius: 6px;\\r\\n -webkit-border-bottom-left-radius: 6px;\\r\\n -moz-border-radius-bottomright: 6px;\\r\\n -moz-border-radius-bottomleft: 6px;\\r\\n border-bottom-right-radius: 6px;\\r\\n border-bottom-left-radius: 6px;\\r\\n}\\r\\n.promotably-theme .offer-content {\\r\\n text-align: center;\\r\\n}\\r\\n.promotably-theme .offer-content p.offer-line1 {\\r\\n font-family: \'League Gothic\';\\r\\n font-size: 50px;\\r\\n text-transform: uppercase;\\r\\n}\\r\\n.promotably-theme .color-call-out {\\r\\n color: #ff4d00;\\r\\n text-transform: inherit;\\r\\n}\\r\\n.promotably-theme .size-call-out {\\r\\n font-size:65px;\\r\\n text-transform: inherit;\\r\\n}\\r\\n.promotably-theme .offer-content p.offer-line2 {\\r\\n margin: 5px 0;\\r\\n}\\r\\n.promotably-theme .offer-content p.offer-line3 {\\r\\n font-family: \'League Gothic\';\\r\\n font-size: 44px;\\r\\n text-transform: uppercase;\\r\\n}\\r\\n.promotably-theme .promotably-promo-code {\\r\\n font-size:50px;\\r\\n color: #00aeef;\\r\\n}\\r\\n.promotably-theme hr {\\r\\n width: 90%;\\r\\n margin: 10px auto;\\r\\n height: 1px;\\r\\n border: 0;\\r\\n border-top: 1px solid #f0f0f0;\\r\\n}\\r\\n.promotably-theme .promotably-countdown span {\\r\\n font-family: \'League Gothic\';\\r\\n font-size: 35px;\\r\\n text-transform: uppercase;\\r\\n color: #00aeef;\\r\\n}\\r\\n.promotably-theme .promotably-countdown span.promotably-countdown-day,\\r\\n.promotably-theme .promotably-countdown span.promotably-countdown-hour,\\r\\n.promotably-theme .promotably-countdown span.promotably-countdown-minute,\\r\\n.promotably-theme .promotably-countdown span.promotably-countdown-second {\\r\\n font-size: 47px;\\r\\n}\\r\\n.promotably-theme a.promotably-close {\\r\\n position: absolute;\\r\\n display: block;\\r\\n right: 5px;\\r\\n top: 4px;\\r\\n font-size: 36px;\\r\\n line-height: 0.8em;\\r\\n color: #bfbfbf;\\r\\n}\\r\\n.promotably-theme a.promotably-close:hover {\\r\\n color: #848484;\\r\\n}\\r\\n\\r\\n@media (min-width: 320px) and (max-width: 820px) {\\r\\n .promotably-theme {\\r\\n width: 540px;\\r\\n padding: 20px;\\r\\n background: #fff;\\r\\n }\\r\\n}\\r\\n\\r\\n@media (min-width: 320px) and (max-width: 620px) {\\r\\n .promotably-theme {\\r\\n width: 360px;\\r\\n padding: 20px;\\r\\n font-size: 16px;\\r\\n }\\r\\n .promotably-theme .offer-content p.offer-line1 {\\r\\n font-size: 40px;\\r\\n }\\r\\n .promotably-theme .size-call-out {\\r\\n font-size:55px;\\r\\n }\\r\\n .promotably-theme .offer-content p.offer-line3 {\\r\\n font-size: 34px;\\r\\n }\\r\\n .promotably-theme .promotably-promo-code {\\r\\n font-size: 40px;\\r\\n }\\r\\n .promotably-theme .promotably-countdown span {\\r\\n font-size: 25px;\\r\\n }\\r\\n .promotably-theme .promotably-countdown span.promotably-countdown-day,\\r\\n .promotably-theme .promotably-countdown span.promotably-countdown-hour,\\r\\n .promotably-theme .promotably-countdown span.promotably-countdown-minute,\\r\\n .promotably-theme .promotably-countdown span.promotably-countdown-second {\\r\\n font-size: 37px;\\r\\n }\\r\\n}\\r\\n\\r\\n@media (min-width: 320px) and (max-width: 420px) {\\r\\n .promotably-theme {\\r\\n width: 260px;\\r\\n font-size: 13px;\\r\\n }\\r\\n .promotably-theme .offer-content p.offer-line1 {\\r\\n font-size: 30px;\\r\\n }\\r\\n .promotably-theme .size-call-out {\\r\\n font-size:40px;\\r\\n }\\r\\n .promotably-theme .offer-content p.offer-line3 {\\r\\n font-size: 24px;\\r\\n }\\r\\n .promotably-theme .promotably-promo-code {\\r\\n font-size: 30px;\\r\\n }\\r\\n .promotably-theme .promotably-countdown span {\\r\\n font-size: 20px;\\r\\n }\\r\\n .promotably-theme .promotably-countdown span.promotably-countdown-day,\\r\\n .promotably-theme .promotably-countdown span.promotably-countdown-hour,\\r\\n .promotably-theme .promotably-countdown span.promotably-countdown-minute,\\r\\n .promotably-theme .promotably-countdown span.promotably-countdown-second {\\r\\n font-size: 30px;\\r\\n }\\r\\n}\\r\\n","theme":"custom"},"active":true,"name":"$15 off orders of $90+ if order made in 15 minutes","code":"15-IN-15","site-id":"5f00bf6d-12ba-4540-b90a-67901f36c283"}' --compressed
This should be corrected now in staging.
@vrivellino cheers looks great!
I think we might have a character encoding issue somewhere on the backend.
The close button in the PacWave offer is a multiplication sign U+00D7
×
- look for\xd7
in the cURL below.I see this being saved in the correct format but then when I retrieve the offer from the API,
×
has been replaced by?
.For now I am going to use a standard letter
x
which will look a bit weird. This needs fixing! The default templates all use×
for close as well.