Improving metadata sanitization.
This commit is contained in:
parent
1e97ae3489
commit
1a2f5a3a4a
26
src/MiniDocs/GtGQLSnippet.extension.st
Normal file
26
src/MiniDocs/GtGQLSnippet.extension.st
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Extension { #name : #GtGQLSnippet }
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
GtGQLSnippet >> metadataUpdate [
|
||||||
|
| createEmailSanitized editEmailSanitized |
|
||||||
|
createEmailSanitized := self createEmail asString withoutXMLTagDelimiters.
|
||||||
|
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
||||||
|
^ OrderedDictionary new
|
||||||
|
at: 'id' put: self uidString;
|
||||||
|
at: 'parent' put: self parent uuid;
|
||||||
|
at: 'created' put: self createTime asString;
|
||||||
|
at: 'modified' put: self latestEditTime asString;
|
||||||
|
at: 'creator' put: createEmailSanitized;
|
||||||
|
at: 'modifier' put: editEmailSanitized;
|
||||||
|
yourself
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
GtGQLSnippet >> sanitizeMetadata [
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
26
src/MiniDocs/LeChangesSnippet.extension.st
Normal file
26
src/MiniDocs/LeChangesSnippet.extension.st
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Extension { #name : #LeChangesSnippet }
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeChangesSnippet >> metadataUpdate [
|
||||||
|
| createEmailSanitized editEmailSanitized |
|
||||||
|
createEmailSanitized := self createEmail asString withoutXMLTagDelimiters.
|
||||||
|
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
||||||
|
^ OrderedDictionary new
|
||||||
|
at: 'id' put: self uidString;
|
||||||
|
at: 'parent' put: self parent uuid;
|
||||||
|
at: 'created' put: self createTime asString;
|
||||||
|
at: 'modified' put: self latestEditTime asString;
|
||||||
|
at: 'creator' put: createEmailSanitized;
|
||||||
|
at: 'modifier' put: editEmailSanitized;
|
||||||
|
yourself
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeChangesSnippet >> sanitizeMetadata [
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
26
src/MiniDocs/LeDockerSnippet.extension.st
Normal file
26
src/MiniDocs/LeDockerSnippet.extension.st
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Extension { #name : #LeDockerSnippet }
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeDockerSnippet >> metadataUpdate [
|
||||||
|
| createEmailSanitized editEmailSanitized |
|
||||||
|
createEmailSanitized := self createEmail asString withoutXMLTagDelimiters.
|
||||||
|
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
||||||
|
^ OrderedDictionary new
|
||||||
|
at: 'id' put: self uidString;
|
||||||
|
at: 'parent' put: self parent uuid;
|
||||||
|
at: 'created' put: self createTime asString;
|
||||||
|
at: 'modified' put: self latestEditTime asString;
|
||||||
|
at: 'creator' put: createEmailSanitized;
|
||||||
|
at: 'modifier' put: editEmailSanitized;
|
||||||
|
yourself
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeDockerSnippet >> sanitizeMetadata [
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
@ -5,3 +5,28 @@ LeExampleSnippet >> asMarkdeep [
|
|||||||
|
|
||||||
^ (WriteStream on: '') contents
|
^ (WriteStream on: '') contents
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeExampleSnippet >> metadataUpdate [
|
||||||
|
| createEmailSanitized editEmailSanitized |
|
||||||
|
createEmailSanitized := self createEmail asString withoutXMLTagDelimiters.
|
||||||
|
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
||||||
|
^ OrderedDictionary new
|
||||||
|
at: 'id' put: self uidString;
|
||||||
|
at: 'parent' put: self parent uuid;
|
||||||
|
at: 'created' put: self createTime asString;
|
||||||
|
at: 'modified' put: self latestEditTime asString;
|
||||||
|
at: 'creator' put: createEmailSanitized;
|
||||||
|
at: 'modifier' put: editEmailSanitized;
|
||||||
|
yourself
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeExampleSnippet >> sanitizeMetadata [
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
26
src/MiniDocs/LeGitHubSnippet.extension.st
Normal file
26
src/MiniDocs/LeGitHubSnippet.extension.st
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Extension { #name : #LeGitHubSnippet }
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeGitHubSnippet >> metadataUpdate [
|
||||||
|
| createEmailSanitized editEmailSanitized |
|
||||||
|
createEmailSanitized := self createEmail asString withoutXMLTagDelimiters.
|
||||||
|
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
||||||
|
^ OrderedDictionary new
|
||||||
|
at: 'id' put: self uidString;
|
||||||
|
at: 'parent' put: self parent uuid;
|
||||||
|
at: 'created' put: self createTime asString;
|
||||||
|
at: 'modified' put: self latestEditTime asString;
|
||||||
|
at: 'creator' put: createEmailSanitized;
|
||||||
|
at: 'modifier' put: editEmailSanitized;
|
||||||
|
yourself
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeGitHubSnippet >> sanitizeMetadata [
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
26
src/MiniDocs/LeJenkinsSnippet.extension.st
Normal file
26
src/MiniDocs/LeJenkinsSnippet.extension.st
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Extension { #name : #LeJenkinsSnippet }
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeJenkinsSnippet >> metadataUpdate [
|
||||||
|
| createEmailSanitized editEmailSanitized |
|
||||||
|
createEmailSanitized := self createEmail asString withoutXMLTagDelimiters.
|
||||||
|
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
||||||
|
^ OrderedDictionary new
|
||||||
|
at: 'id' put: self uidString;
|
||||||
|
at: 'parent' put: self parent uuid;
|
||||||
|
at: 'created' put: self createTime asString;
|
||||||
|
at: 'modified' put: self latestEditTime asString;
|
||||||
|
at: 'creator' put: createEmailSanitized;
|
||||||
|
at: 'modifier' put: editEmailSanitized;
|
||||||
|
yourself
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeJenkinsSnippet >> sanitizeMetadata [
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
26
src/MiniDocs/LeMockedSnippet.extension.st
Normal file
26
src/MiniDocs/LeMockedSnippet.extension.st
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Extension { #name : #LeMockedSnippet }
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeMockedSnippet >> metadataUpdate [
|
||||||
|
| createEmailSanitized editEmailSanitized |
|
||||||
|
createEmailSanitized := self createEmail asString withoutXMLTagDelimiters.
|
||||||
|
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
||||||
|
^ OrderedDictionary new
|
||||||
|
at: 'id' put: self uidString;
|
||||||
|
at: 'parent' put: self parent uuid;
|
||||||
|
at: 'created' put: self createTime asString;
|
||||||
|
at: 'modified' put: self latestEditTime asString;
|
||||||
|
at: 'creator' put: createEmailSanitized;
|
||||||
|
at: 'modifier' put: editEmailSanitized;
|
||||||
|
yourself
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeMockedSnippet >> sanitizeMetadata [
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
26
src/MiniDocs/LePharoRewriteSnippet.extension.st
Normal file
26
src/MiniDocs/LePharoRewriteSnippet.extension.st
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Extension { #name : #LePharoRewriteSnippet }
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LePharoRewriteSnippet >> metadataUpdate [
|
||||||
|
| createEmailSanitized editEmailSanitized |
|
||||||
|
createEmailSanitized := self createEmail asString withoutXMLTagDelimiters.
|
||||||
|
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
||||||
|
^ OrderedDictionary new
|
||||||
|
at: 'id' put: self uidString;
|
||||||
|
at: 'parent' put: self parent uuid;
|
||||||
|
at: 'created' put: self createTime asString;
|
||||||
|
at: 'modified' put: self latestEditTime asString;
|
||||||
|
at: 'creator' put: createEmailSanitized;
|
||||||
|
at: 'modifier' put: editEmailSanitized;
|
||||||
|
yourself
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LePharoRewriteSnippet >> sanitizeMetadata [
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
@ -78,3 +78,13 @@ LePictureSnippet >> metadataUpdate [
|
|||||||
at: 'modifier' put: self editEmail asString;
|
at: 'modifier' put: self editEmail asString;
|
||||||
yourself
|
yourself
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LePictureSnippet >> sanitizeMetadata [
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
26
src/MiniDocs/LeSmaCCRewriteSnippet.extension.st
Normal file
26
src/MiniDocs/LeSmaCCRewriteSnippet.extension.st
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Extension { #name : #LeSmaCCRewriteSnippet }
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeSmaCCRewriteSnippet >> metadataUpdate [
|
||||||
|
| createEmailSanitized editEmailSanitized |
|
||||||
|
createEmailSanitized := self createEmail asString withoutXMLTagDelimiters.
|
||||||
|
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
||||||
|
^ OrderedDictionary new
|
||||||
|
at: 'id' put: self uidString;
|
||||||
|
at: 'parent' put: self parent uuid;
|
||||||
|
at: 'created' put: self createTime asString;
|
||||||
|
at: 'modified' put: self latestEditTime asString;
|
||||||
|
at: 'creator' put: createEmailSanitized;
|
||||||
|
at: 'modifier' put: editEmailSanitized;
|
||||||
|
yourself
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeSmaCCRewriteSnippet >> sanitizeMetadata [
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
@ -16,21 +16,6 @@ LeSnippet >> metadata [
|
|||||||
^ self metadataUpdate
|
^ self metadataUpdate
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
|
||||||
LeSnippet >> metadataUpdate [
|
|
||||||
| createEmailSanitized editEmailSanitized |
|
|
||||||
createEmailSanitized := self createEmail asString withoutXMLTagDelimiters.
|
|
||||||
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
|
||||||
^ OrderedDictionary new
|
|
||||||
at: 'id' put: self uidString;
|
|
||||||
at: 'parent' put: self parent uuid;
|
|
||||||
at: 'created' put: self createTime asString;
|
|
||||||
at: 'modified' put: self latestEditTime asString;
|
|
||||||
at: 'creator' put: createEmailSanitized;
|
|
||||||
at: 'modifier' put: editEmailSanitized;
|
|
||||||
yourself
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LeSnippet >> moveToPageTitled: pageName [
|
LeSnippet >> moveToPageTitled: pageName [
|
||||||
| db origin destination thisSnippet |
|
| db origin destination thisSnippet |
|
||||||
@ -41,13 +26,3 @@ LeSnippet >> moveToPageTitled: pageName [
|
|||||||
origin removeSnippet: thisSnippet.
|
origin removeSnippet: thisSnippet.
|
||||||
destination addSnippet: thisSnippet.
|
destination addSnippet: thisSnippet.
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
|
||||||
LeSnippet >> sanitizeMetadata [
|
|
||||||
self metadata keysAndValuesDo: [:k :v |
|
|
||||||
(v includesAny: #($< $>))
|
|
||||||
ifTrue: [
|
|
||||||
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
@ -84,6 +84,22 @@ LeTextualSnippet >> metadataUpdate [
|
|||||||
yourself
|
yourself
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeTextualSnippet >> options [
|
||||||
|
^ options
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeTextualSnippet >> sanitizeMetadata [
|
||||||
|
self options removeKey: 'metadata'.
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutXMLDelimiters)
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LeTextualSnippet >> tags [
|
LeTextualSnippet >> tags [
|
||||||
^ self metadata at: 'tags' ifAbsentPut: [ Set new ]
|
^ self metadata at: 'tags' ifAbsentPut: [ Set new ]
|
||||||
|
26
src/MiniDocs/LeWardleyMapSnippet.extension.st
Normal file
26
src/MiniDocs/LeWardleyMapSnippet.extension.st
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Extension { #name : #LeWardleyMapSnippet }
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeWardleyMapSnippet >> metadataUpdate [
|
||||||
|
| createEmailSanitized editEmailSanitized |
|
||||||
|
createEmailSanitized := self createEmail asString withoutXMLTagDelimiters.
|
||||||
|
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
||||||
|
^ OrderedDictionary new
|
||||||
|
at: 'id' put: self uidString;
|
||||||
|
at: 'parent' put: self parent uuid;
|
||||||
|
at: 'created' put: self createTime asString;
|
||||||
|
at: 'modified' put: self latestEditTime asString;
|
||||||
|
at: 'creator' put: createEmailSanitized;
|
||||||
|
at: 'modifier' put: editEmailSanitized;
|
||||||
|
yourself
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeWardleyMapSnippet >> sanitizeMetadata [
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
26
src/MiniDocs/LeWordSnippet.extension.st
Normal file
26
src/MiniDocs/LeWordSnippet.extension.st
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Extension { #name : #LeWordSnippet }
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeWordSnippet >> metadataUpdate [
|
||||||
|
| createEmailSanitized editEmailSanitized |
|
||||||
|
createEmailSanitized := self createEmail asString withoutXMLTagDelimiters.
|
||||||
|
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
||||||
|
^ OrderedDictionary new
|
||||||
|
at: 'id' put: self uidString;
|
||||||
|
at: 'parent' put: self parent uuid;
|
||||||
|
at: 'created' put: self createTime asString;
|
||||||
|
at: 'modified' put: self latestEditTime asString;
|
||||||
|
at: 'creator' put: createEmailSanitized;
|
||||||
|
at: 'modifier' put: editEmailSanitized;
|
||||||
|
yourself
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeWordSnippet >> sanitizeMetadata [
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
@ -45,3 +45,13 @@ LeYoutubeReferenceSnippet >> metadataUpdate [
|
|||||||
at: 'modifier' put: self editEmail asString;
|
at: 'modifier' put: self editEmail asString;
|
||||||
yourself
|
yourself
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeYoutubeReferenceSnippet >> sanitizeMetadata [
|
||||||
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
(v includesAny: #($< $>))
|
||||||
|
ifTrue: [
|
||||||
|
self metadata at: k put: (v copyWithoutAll: #($< $>))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user