Skip to content

Commit 0484e77

Browse files
committed
MBS-14152: Added Livenation Thailand URL Recognition
1 parent 33a798c commit 0484e77

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

root/static/scripts/edit/URLCleanup.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3961,10 +3961,11 @@ export const CLEANUPS: CleanupEntries = {
39613961
},
39623962
},
39633963
'livenation': {
3964-
hostname: 'livenation.*',
3965-
match: [/^(https?:\/\/)?(?:(?:concerts|www)\.)?livenation\.(?:[a-z]{2,3}?\.)?[a-z]{2,4}\//i],
3964+
hostname: ['livenation.*', 'livenationtero.co.th'],
3965+
match: [/^(https?:\/\/)?(?:(?:concerts|www)\.)?livenation\.(?:[a-z]{2,3}?\.)?[a-z]{2,4}\//i, /^(https?:\/\/)?(?:www\.)?livenationtero\.co\.th\//i],
39663966
restrict: [LINK_TYPES.ticketing],
39673967
clean(url) {
3968+
url = url.replace(/^(?:https?:\/\/)?(?:www\.)?livenationtero\.co\.th\//, 'https://www.livenation.co.th/');
39683969
url = url.replace(/^(?:https?:\/\/)?concerts\.livenation\.com\/(?:[\w\d-]+\/)?event\/([0-9A-F]+).*$/, 'https://concerts.livenation.com/event/$1');
39693970
url = url.replace(/^(?:https?:\/\/)?(?:www\.)?livenation\.com\/(artist|event|venue)\/([\w-]+).*$/, 'https://www.livenation.com/$1/$2');
39703971
// International sites use somewhat different formats

root/static/scripts/tests/Control/URLCleanup.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3942,6 +3942,27 @@ limited_link_type_combinations: [
39423942
expected_clean_url: 'https://www.livenation.ee/venue/953330',
39433943
only_valid_entity_types: ['place'],
39443944
},
3945+
{
3946+
input_url: 'https://www.livenationtero.co.th/event/hotwax-the-hot-shock-tour-london-tickets-edp1627436',
3947+
input_entity_type: 'event',
3948+
expected_relationship_type: 'ticketing',
3949+
expected_clean_url: 'https://www.livenation.co.th/event/edp1627436',
3950+
only_valid_entity_types: ['event'],
3951+
},
3952+
{
3953+
input_url: 'https://livenationtero.co.th/artist/K8vZ9171ulV/alice-cooper-events#artist-info',
3954+
input_entity_type: 'artist',
3955+
expected_relationship_type: 'ticketing',
3956+
expected_clean_url: 'https://www.livenation.co.th/artist/K8vZ9171ulV',
3957+
only_valid_entity_types: ['artist'],
3958+
},
3959+
{
3960+
input_url: 'https://www.livenationtero.co.th/venue/953330/alexela-kontserdimaja-tickets#venueinfo',
3961+
input_entity_type: 'place',
3962+
expected_relationship_type: 'ticketing',
3963+
expected_clean_url: 'https://www.livenation.co.th/venue/953330',
3964+
only_valid_entity_types: ['place'],
3965+
},
39453966
// Loudr
39463967
{
39473968
input_url: 'https://loudr.fm/artist/kyle-landry/Z77SM?test',

0 commit comments

Comments
 (0)